sub Categorise fixed

merge-update-with-lab-changes
hussam al-habibeh 4 years ago
parent 80c6be239e
commit e917da9183

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

Loading…
Cancel
Save