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