Add designs templates
This commit is contained in:
parent
911c95bd0a
commit
589e9483a4
|
|
@ -1,5 +1,6 @@
|
|||
// Package imports:
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:memoize/memoize.dart';
|
||||
|
||||
// Project imports:
|
||||
|
|
@ -101,6 +102,10 @@ String? getDesignIdForVendorByEntity(
|
|||
|
||||
bool hasDesignTemplatesForEntityType(
|
||||
BuiltMap<String, DesignEntity> designMap, EntityType entityType) {
|
||||
if (!kReleaseMode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var hasMatch = false;
|
||||
|
||||
designMap.forEach((designId, design) {
|
||||
|
|
|
|||
|
|
@ -432,7 +432,27 @@ class _ClientPdfViewState extends State<ClientPdfView> {
|
|||
sectionPicker,
|
||||
],
|
||||
)
|
||||
: Placeholder(),
|
||||
: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
datePicker,
|
||||
SizedBox(width: 16),
|
||||
statusPicker,
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
if (hasDesignTemplatesForEntityType(
|
||||
state.designState.map, EntityType.client)) ...[
|
||||
designPicker,
|
||||
SizedBox(width: 16),
|
||||
],
|
||||
sectionPicker,
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_dateRange == DateRange.custom)
|
||||
|
|
|
|||
Loading…
Reference in New Issue