|
|
|
@ -28,12 +28,14 @@ class SubCategorisePage extends StatefulWidget {
|
|
|
|
|
String title;
|
|
|
|
|
String parentId;
|
|
|
|
|
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject =
|
|
|
|
|
locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
SubCategorisePage({this.id, this.parentId, this.title});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_SubCategorisePageState createState() => _SubCategorisePageState(id: id, title: title, parentId: parentId);
|
|
|
|
|
_SubCategorisePageState createState() =>
|
|
|
|
|
_SubCategorisePageState(id: id, title: title, parentId: parentId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
@ -68,7 +70,6 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
|
builder: (BuildContext context, PharmacyCategoriseViewModel model,
|
|
|
|
|
Widget child) =>
|
|
|
|
|
PharmacyAppScaffold(
|
|
|
|
|
builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => PharmacyAppScaffold(
|
|
|
|
|
appBarTitle: title,
|
|
|
|
|
isBottomBar: false,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
@ -290,24 +291,24 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
Divider(
|
|
|
|
|
thickness: 1.0,
|
|
|
|
|
color: Colors.grey.shade400,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(Icons.wrap_text),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10.0,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).refine,
|
|
|
|
|
Divider(
|
|
|
|
|
thickness: 1.0,
|
|
|
|
|
color: Colors.grey.shade400,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(Icons.wrap_text),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10.0,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).refine,
|
|
|
|
|
// 'Refine',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
@ -589,8 +590,8 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
|
"";
|
|
|
|
|
for (CategoriseParentModel category
|
|
|
|
|
in entityList) {
|
|
|
|
|
if (categoriesId =="") {
|
|
|
|
|
|
|
|
|
|
if (categoriesId ==
|
|
|
|
|
"") {
|
|
|
|
|
categoriesId =
|
|
|
|
|
category.id;
|
|
|
|
|
} else {
|
|
|
|
@ -599,12 +600,13 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String
|
|
|
|
|
brandIds ="";
|
|
|
|
|
brandIds =
|
|
|
|
|
"";
|
|
|
|
|
|
|
|
|
|
for (CategoriseParentModel brand
|
|
|
|
|
in entityListBrands) {
|
|
|
|
|
if (brandIds =="") {
|
|
|
|
|
|
|
|
|
|
if (brandIds ==
|
|
|
|
|
"") {
|
|
|
|
|
brandIds =
|
|
|
|
|
brand.id;
|
|
|
|
|
} else {
|
|
|
|
@ -1267,7 +1269,8 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isEntityListSelected(CategoriseParentModel masterKey) {
|
|
|
|
|
Iterable<CategoriseParentModel> history = entityList.where((element) => masterKey.id == element.id);
|
|
|
|
|
Iterable<CategoriseParentModel> history =
|
|
|
|
|
entityList.where((element) => masterKey.id == element.id);
|
|
|
|
|
if (history.length > 0) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -1275,7 +1278,8 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isEntityListSelectedBrands(CategoriseParentModel masterKey) {
|
|
|
|
|
Iterable<CategoriseParentModel> history = entityListBrands.where((element) => masterKey.id == element.id);
|
|
|
|
|
Iterable<CategoriseParentModel> history =
|
|
|
|
|
entityListBrands.where((element) => masterKey.id == element.id);
|
|
|
|
|
if (history.length > 0) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|