Add designs templates

This commit is contained in:
Hillel Coren 2023-11-09 18:17:02 +02:00
parent 911c95bd0a
commit 589e9483a4
2 changed files with 26 additions and 1 deletions

View File

@ -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) {

View File

@ -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)