Merge branch 'fix-pharmacy' into 'development'

Fix pharmacy

See merge request Cloud_Solution/diplomatic-quarter!269
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 2ec9331d2f

@ -383,7 +383,7 @@ const GET_TOP_BRANDS = "topmanufacturer?page=1&limit=8";
const GET_PRODUCT_DETAIL = "products/"; const GET_PRODUCT_DETAIL = "products/";
const GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU"; const GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU";
const GET_SPECIFICATION = "productspecification/"; const GET_SPECIFICATION = "productspecification/";
const GET_BRAND_ITEMS = "products?ManufacturerId="; const GET_BRAND_ITEMS = "products";
// External API // External API
const ADD_ADDRESS_INFO = "addcustomeraddress"; const ADD_ADDRESS_INFO = "addcustomeraddress";
@ -400,7 +400,8 @@ const GET_PARENT_PRODUCTS = 'products?categoryid=';
const GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; const GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=';
const GET_SUB_PRODUCTS = 'products?categoryid='; const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS = const GET_FINAL_PRODUCTS =
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory';
const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';

@ -590,6 +590,7 @@ const Map localizedValues = {
"checkBeneficiary": {"en": "CHECK BENEFICIARY", "ar": "تحقق من المستفيد"}, "checkBeneficiary": {"en": "CHECK BENEFICIARY", "ar": "تحقق من المستفيد"},
"beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"}, "beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"},
"accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"}, "accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"},
"lakumTransfer": {"en": "Lakum Transfer", "ar": "تفعيل الحساب"},
"acceptLbl": {"en": "Accept", "ar": "موافقة"}, "acceptLbl": {"en": "Accept", "ar": "موافقة"},
"select-gender": {"en": "Select Gender", "ar": "اختر الجنس"}, "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
"i-am-a": {"en": "I am a ...", "ar": "أنا ..."}, "i-am-a": {"en": "I am a ...", "ar": "أنا ..."},
@ -1333,6 +1334,11 @@ const Map localizedValues = {
"en": "UPDATE THE APP", "en": "UPDATE THE APP",
"ar": "تحديث التطبيق" "ar": "تحديث التطبيق"
}, },
"enterIdentificationNumber": {"en" : "Enter Identification Number", "ar": "أدخل رقم التعريف"},
"accountActivationDesc": {"en" : "This service allows you to activate your LAKUM account after registering through the Vida system.", "ar": "تتيح لك هذه الخدمة تفعيل حساب LAKUM الخاص بك بعد التسجيل من خلال نظام Vida."},
"pointsToTransfer": {"en" : "Point's to Transfer :", "ar": "النقاط المراد تحويلها:"},
"enterBeneficiaryAccountNo": {"en" : "Enter Beneficiary Account No.", "ar": "أدخل رقم حساب المستفيد"},
// "visit": {"en" : "Visit", "ar": "الزيارة"},
"confirm-prescription": { "confirm-prescription": {
"en": "Are you sure !! you want to send this request", "en": "Are you sure !! you want to send this request",
"ar": "تاكيد ارسال الطلب؟" "ar": "تاكيد ارسال الطلب؟"

@ -281,10 +281,10 @@ class BaseAppClient {
final response = await http.get(url.trim(), headers: { final response = await http.get(url.trim(), headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json', 'Accept': 'application/json',
'Authorization': token, 'Authorization': token??'',
'Mobilenumber':getPhoneNumberWithoutZero(user['MobileNumber'].toString()), 'Mobilenumber': user != null ? getPhoneNumberWithoutZero(user['MobileNumber'].toString()): "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(), 'Username': user != null ? user['PatientID'].toString() : "",
}); });
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");

@ -49,6 +49,8 @@ class PharmacyCategoriseService extends BaseService {
List<ScanQrModel> _scanList = List(); List<ScanQrModel> _scanList = List();
List<ScanQrModel> get scanList => _scanList; List<ScanQrModel> get scanList => _scanList;
List<FinalProductsModel> manufacturerProducts = List();
clearSearchList() { clearSearchList() {
_searchList.clear(); _searchList.clear();
} }
@ -222,4 +224,23 @@ class PharmacyCategoriseService extends BaseService {
}, },
); );
} }
Future getManufacturerProducts(String id) async {
hasError = false;
Map<String, String> queryParams = {'ManufacturerId': id};
manufacturerProducts.clear();
await baseAppClient.getPharmacy(
GET_BRAND_ITEMS,
onSuccess: (dynamic response, int statusCode) {
response['products'].forEach((item) {
manufacturerProducts.add(FinalProductsModel.fromJson(item));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, queryParams: queryParams,
);
}
} }

@ -19,11 +19,13 @@ class LacumRegistrationViewModel extends LacumViewModel {
error = _lacumService.error; error = _lacumService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
if(_lacumService.lacumInformation.yahalaAccountNo != 0){ if(_lacumService.lacumInformation != null){
error = "The account has already been activated"; if(_lacumService.lacumInformation.yahalaAccountNo == 0){
setState(ViewState.Error); error = _lacumService.lacumInformation.errorEndUserMessage;
} else { setState(ViewState.Error);
setState(ViewState.Idle); } else {
setState(ViewState.Idle);
}
} }
} }
} }

@ -19,6 +19,9 @@ class LacumViewModel extends BaseViewModel {
LacumAccountInformation get lacumGroupInformation => LacumAccountInformation get lacumGroupInformation =>
_lacumService.lacumGroupInformation; _lacumService.lacumGroupInformation;
String get successMsg =>
_lacumService.successMsg;
Future getLacumData() async { Future getLacumData() async {
await getLacumAccountData(); await getLacumAccountData();
getLacumGroupData(); getLacumGroupData();
@ -70,16 +73,14 @@ class LacumViewModel extends BaseViewModel {
} }
} }
Future<int> createLakumAccount(String name, String phone) async { Future createLakumAccount(String name, String phone) async {
setState(ViewState.Busy); setState(ViewState.BusyLocal);
await _lacumService.createLakumAccount(name, phone, lacumInformation.yahalaAccountNo, lacumInformation.identificationNo, null); await _lacumService.createLakumAccount(name, phone, lacumInformation.yahalaAccountNo, lacumInformation.identificationNo, null);
if (_lacumService.hasError) { if (_lacumService.hasError) {
error = _lacumService.error; error = _lacumService.error;
setState(ViewState.Error); setState(ViewState.ErrorLocal);
return 404;
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
return 200;
} }
} }

@ -11,17 +11,14 @@ import '../../../locator.dart';
class ProductDetailViewModel extends BaseViewModel{ class ProductDetailViewModel extends BaseViewModel{
ProductDetailService _productDetailService = locator<ProductDetailService>(); ProductDetailService _productDetailService = locator<ProductDetailService>();
ProductDetailService _productLocationService = locator<ProductDetailService>();
ProductDetailService _productWishlistService = locator<ProductDetailService>();
ProductDetailService _productSpecification = locator<ProductDetailService>();
List<ProductDetail> get productDetailService => _productDetailService.productDetailList; List<ProductDetail> get productDetailService => _productDetailService.productDetailList;
List<LocationModel> get productLocationService => _productLocationService.productLocationList; List<LocationModel> get productLocationService => _productDetailService.productLocationList;
List<Wishlist> get wishListItems => _productWishlistService.wishListProducts; List<Wishlist> get wishListItems => _productDetailService.wishListProducts;
List<SpecificationModel> get productSpecification => _productSpecification.productSpecification; List<SpecificationModel> get productSpecification => _productDetailService.productSpecification;
bool hasError = false; bool hasError = false;
@ -42,9 +39,9 @@ class ProductDetailViewModel extends BaseViewModel{
print('ENAD in model view'); print('ENAD in model view');
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _productLocationService.getProductAvailabiltyDetail(); await _productDetailService.getProductAvailabiltyDetail();
if (_productLocationService.hasError) { if (_productDetailService.hasError) {
error = _productLocationService.error; error = _productDetailService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
@ -53,9 +50,9 @@ class ProductDetailViewModel extends BaseViewModel{
Future notifyMe(customerId, itemID) async { Future notifyMe(customerId, itemID) async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _productLocationService.notifyMe(customerId, itemID); await _productDetailService.notifyMe(customerId, itemID);
if (_productLocationService.hasError) { if (_productDetailService.hasError) {
error = _productLocationService.error; error = _productDetailService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
@ -64,9 +61,9 @@ class ProductDetailViewModel extends BaseViewModel{
Future addToCartData(quantity, itemID) async { Future addToCartData(quantity, itemID) async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _productLocationService.addToCart(quantity, itemID); await _productDetailService.addToCart(quantity, itemID);
if (_productLocationService.hasError) { if (_productDetailService.hasError) {
error = _productLocationService.error; error = _productDetailService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
@ -75,9 +72,9 @@ class ProductDetailViewModel extends BaseViewModel{
Future addToWishlistData(itemID) async { Future addToWishlistData(itemID) async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _productLocationService.addToWishlist(itemID); await _productDetailService.addToWishlist(itemID);
if (_productLocationService.hasError) { if (_productDetailService.hasError) {
error = _productLocationService.error; error = _productDetailService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
@ -86,9 +83,9 @@ class ProductDetailViewModel extends BaseViewModel{
Future checkWishlistData() async { Future checkWishlistData() async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _productWishlistService.getWishlistItems(); await _productDetailService.getWishlistItems();
if (_productWishlistService.hasError) { if (_productDetailService.hasError) {
error = _productWishlistService.error; error = _productDetailService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
@ -98,9 +95,9 @@ class ProductDetailViewModel extends BaseViewModel{
Future deletWishlistData(itemID) async { Future deletWishlistData(itemID) async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _productWishlistService.delteItemFromWishlist(itemID); await _productDetailService.delteItemFromWishlist(itemID);
if (_productWishlistService.hasError) { if (_productDetailService.hasError) {
error = _productWishlistService.error; error = _productDetailService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
@ -110,9 +107,9 @@ class ProductDetailViewModel extends BaseViewModel{
Future productSpecificationData(itemID) async { Future productSpecificationData(itemID) async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _productWishlistService.productSpecificationData(itemID); await _productDetailService.productSpecificationData(itemID);
if (_productWishlistService.hasError) { if (_productDetailService.hasError) {
error = _productWishlistService.error; error = _productDetailService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);

@ -147,4 +147,15 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getManufacturerProducts(String id) async {
setState(ViewState.Busy);
await _pharmacyCategoriseService.getManufacturerProducts(id);
if (_pharmacyCategoriseService.hasError) {
error = _pharmacyCategoriseService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart';
@ -8,15 +9,20 @@ import 'package:flutter/material.dart';
import 'base/base_view.dart'; import 'base/base_view.dart';
class FinalProductsPage extends StatefulWidget { class FinalProductsPage extends StatefulWidget {
String id; final String id;
FinalProductsPage({this.id}); final int productType;
FinalProductsPage({this.id, this.productType = 1});
@override @override
_FinalProductsPageState createState() => _FinalProductsPageState(id: id); _FinalProductsPageState createState() => _FinalProductsPageState(id: id);
} }
class _FinalProductsPageState extends State<FinalProductsPage> { class _FinalProductsPageState extends State<FinalProductsPage> {
String id; String id;
_FinalProductsPageState({this.id}); _FinalProductsPageState({this.id});
String categoriseName = "Personal Care"; String categoriseName = "Personal Care";
bool styleOne = true; bool styleOne = true;
bool styleTwo = false; bool styleTwo = false;
@ -25,14 +31,17 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
color: Colors.blue, color: Colors.blue,
size: 29.0, size: 29.0,
); );
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PharmacyCategoriseViewModel>( return BaseView<PharmacyCategoriseViewModel>(
onModelReady: (model) => model.getFinalProducts(i: id), onModelReady: (model) => widget.productType == 1
? model.getFinalProducts(i: id)
: model.getManufacturerProducts(id),
builder: (BuildContext context, PharmacyCategoriseViewModel model, builder: (BuildContext context, PharmacyCategoriseViewModel model,
Widget child) => Widget child) =>
PharmacyAppScaffold( PharmacyAppScaffold(
appBarTitle: 'Products', appBarTitle: "Products",
isBottomBar: false, isBottomBar: false,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.white, backgroundColor: Colors.white,

@ -20,8 +20,9 @@ class LakumActivationVidaPage extends StatelessWidget {
return BaseView<LacumRegistrationViewModel>( return BaseView<LacumRegistrationViewModel>(
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
title: "Acount Activation", appBarTitle: TranslationBase.of(context).accountActivation,
isShowAppBar: true, isShowAppBar: true,
isPharmacy: true,
isShowDecPage: false, isShowDecPage: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
baseViewModel: model, baseViewModel: model,
@ -35,7 +36,7 @@ class LakumActivationVidaPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Texts( Texts(
" This service allows you to activate your LAKUM account after registering through the Vida system. ", TranslationBase.of(context).accountActivationDesc,
fontSize: 14, fontSize: 14,
), ),
Padding( Padding(
@ -43,8 +44,10 @@ class LakumActivationVidaPage extends StatelessWidget {
child: TextField( child: TextField(
controller: _identificationNumberController, controller: _identificationNumberController,
decoration: new InputDecoration( decoration: new InputDecoration(
hintText: 'Enter Identification Number', hintText: TranslationBase.of(context)
.enterIdentificationNumber,
), ),
keyboardType: TextInputType.number,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
color: Colors.grey.shade700, color: Colors.grey.shade700,
@ -89,7 +92,7 @@ class LakumActivationVidaPage extends StatelessWidget {
} }
}); });
} }
: null, : () {},
), ),
), ),
], ],

@ -1,7 +1,10 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lacum-banner-widget.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lacum-banner-widget.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -44,6 +47,7 @@ class _LakumSettingPageState extends State<LakumSettingPage> {
appBarTitle: "${TranslationBase.of(context).lakum}", appBarTitle: "${TranslationBase.of(context).lakum}",
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
isPharmacy: true,
backgroundColor: Colors.white, backgroundColor: Colors.white,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
@ -220,13 +224,18 @@ class _LakumSettingPageState extends State<LakumSettingPage> {
hPadding: 8, hPadding: 8,
vPadding: 12, vPadding: 12,
handler: canUpdate handler: canUpdate
? () { ? () async {
model.createLakumAccount(_nameController.text, _phoneController.text).then((status) => { GifLoaderDialogUtils.showMyDialog(context);
if (status == 200) {Navigator.pop(context, "")} await model.createLakumAccount(_nameController.text, _phoneController.text);
// back to previous page GifLoaderDialogUtils.hideDialog(context);
}); if(model.state == ViewState.Idle){
AppToast.showSuccessToast(message: model.successMsg);
Navigator.pop(context, "");
} else if(model.state == ViewState.ErrorLocal){
AppToast.showErrorToast(message: model.error);
}
} }
: null, : (){},
), ),
) )
], ],

@ -37,8 +37,9 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
onModelReady: (model) => model.setLakumData( onModelReady: (model) => model.setLakumData(
widget.lacumInformation, widget.lacumGroupInformation), widget.lacumInformation, widget.lacumGroupInformation),
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
appBarTitle: "${TranslationBase.of(context).lakum}", appBarTitle: "${TranslationBase.of(context).lakumTransfer}",
isShowAppBar: true, isShowAppBar: true,
isPharmacy: true,
isShowDecPage: false, isShowDecPage: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
baseViewModel: model, baseViewModel: model,
@ -83,7 +84,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
children: [ children: [
Container( Container(
child: Texts( child: Texts(
"Point Balance", "${TranslationBase.of(context).point} ${TranslationBase.of(context).balance}",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white, color: Colors.white,
@ -143,7 +144,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
children: [ children: [
Container( Container(
child: Texts( child: Texts(
"Riyal Balance", "${TranslationBase.of(context).riyal} ${TranslationBase.of(context).balance}",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white, color: Colors.white,
@ -182,7 +183,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
child: TextField( child: TextField(
controller: _beneficieryAccountController, controller: _beneficieryAccountController,
decoration: new InputDecoration( decoration: new InputDecoration(
hintText: 'Enter Beneficiary Account No.', hintText: TranslationBase.of(context).enterBeneficiaryAccountNo,
), ),
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
@ -209,7 +210,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
_beneficieryAccountController _beneficieryAccountController
.text); .text);
} }
: null, : (){},
), ),
), ),
(model.lacumReceiverInformation != null && (model.lacumReceiverInformation != null &&
@ -250,7 +251,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
width: double.infinity, width: double.infinity,
), ),
Texts( Texts(
"Point's to Transfer :", TranslationBase.of(context).pointsToTransfer,
color: Colors.black, color: Colors.black,
), ),
Padding( Padding(
@ -284,7 +285,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
Container( Container(
margin: EdgeInsets.all(8), margin: EdgeInsets.all(8),
child: BorderedButton( child: BorderedButton(
"LACUM TRANSFER", TranslationBase.of(context).lakumTransfer,
backgroundColor: Color(0xff339933), backgroundColor: Color(0xff339933),
textColor: Colors.white, textColor: Colors.white,
fontSize: 18, fontSize: 18,

@ -22,7 +22,7 @@ class LakumMainPage extends StatelessWidget {
return BaseView<LacumViewModel>( return BaseView<LacumViewModel>(
onModelReady: (model) => model.getLacumData(), onModelReady: (model) => model.getLacumData(),
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
title: "Lakum", appBarTitle: TranslationBase.of(context).lakum,
isShowAppBar: true, isShowAppBar: true,
isPharmacy: true, isPharmacy: true,
isShowDecPage: false, isShowDecPage: false,
@ -346,7 +346,7 @@ class LakumHomeButtons extends StatelessWidget {
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 16), padding: EdgeInsets.symmetric(horizontal: 16),
child: Texts( child: Texts(
"Account Activation", TranslationBase.of(context).accountActivation,
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -394,7 +394,7 @@ class LakumHomeButtons extends StatelessWidget {
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 16), padding: EdgeInsets.symmetric(horizontal: 16),
child: Texts( child: Texts(
"Lakum Transfer", TranslationBase.of(context).lakumTransfer,
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

@ -285,7 +285,7 @@ class PharmacyPage extends StatelessWidget {
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(10, 0, 10, 0), margin: EdgeInsets.fromLTRB(10, 10, 10, 0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../final_products_page.dart';
class ManufacturerItem extends StatelessWidget { class ManufacturerItem extends StatelessWidget {
final Manufacturer item; final Manufacturer item;
@ -8,25 +10,37 @@ class ManufacturerItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Card( return InkWell(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), onTap: () {
margin: EdgeInsets.symmetric( Navigator.push(
horizontal: 8, context,
vertical: 4, MaterialPageRoute(
), builder: (context) => FinalProductsPage(
child: Container( id: item.id, productType: 2,
decoration: BoxDecoration( ),
border: Border( ),
right: BorderSide(color: Colors.grey.shade300, width: 1), );
bottom: BorderSide(color: Colors.grey.shade300, width: 1), },
left: BorderSide(color: Colors.grey.shade300, width: 1), child: Card(
top: BorderSide(color: Colors.grey.shade300, width: 1)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
margin: EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
), ),
child: Padding( child: Container(
padding: EdgeInsets.symmetric(horizontal: 8), decoration: BoxDecoration(
child: Image.network( border: Border(
item.image.src, right: BorderSide(color: Colors.grey.shade300, width: 1),
fit: BoxFit.cover, bottom: BorderSide(color: Colors.grey.shade300, width: 1),
left: BorderSide(color: Colors.grey.shade300, width: 1),
top: BorderSide(color: Colors.grey.shade300, width: 1)),
),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Image.network(
item.image.src,
fit: BoxFit.cover,
),
), ),
), ),
), ),

@ -47,8 +47,6 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
String lastName, mobileNo, identificationNo; String lastName, mobileNo, identificationNo;
int languageId; int languageId;
_ProfilePageState({this.customerId});
getLanguageID() async { getLanguageID() async {
languageID = await sharedPref.getString(APP_LANGUAGE); languageID = await sharedPref.getString(APP_LANGUAGE);
} }
@ -94,7 +92,10 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<OrderModelViewModel>( return BaseView<OrderModelViewModel>(
onModelReady: (model) => model.getOrder(customerId, page_id), onModelReady: (model) async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
model.getOrder(customerId, page_id);
},
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
appBarTitle: TranslationBase.of(context).myAccount, appBarTitle: TranslationBase.of(context).myAccount,
isShowAppBar: false, isShowAppBar: false,

@ -632,6 +632,7 @@ class TranslationBase {
String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode]; String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode];
String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode]; String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode];
String get accountActivation => localizedValues['accountActivation'][locale.languageCode]; String get accountActivation => localizedValues['accountActivation'][locale.languageCode];
String get lakumTransfer => localizedValues['lakumTransfer'][locale.languageCode];
String get acceptLbl => localizedValues['acceptLbl'][locale.languageCode]; String get acceptLbl => localizedValues['acceptLbl'][locale.languageCode];
String get termsService => localizedValues['TermsService'][locale.languageCode]; String get termsService => localizedValues['TermsService'][locale.languageCode];
@ -1107,6 +1108,10 @@ class TranslationBase {
String get submitncontinue => localizedValues["submitncontinue"][locale.languageCode]; String get submitncontinue => localizedValues["submitncontinue"][locale.languageCode];
String get areyousure => localizedValues["areyousure"][locale.languageCode]; String get areyousure => localizedValues["areyousure"][locale.languageCode];
String get preferredunit => localizedValues["preferredunit"][locale.languageCode]; String get preferredunit => localizedValues["preferredunit"][locale.languageCode];
String get enterIdentificationNumber => localizedValues["enterIdentificationNumber"][locale.languageCode];
String get accountActivationDesc => localizedValues["accountActivationDesc"][locale.languageCode];
String get pointsToTransfer => localizedValues["pointsToTransfer"][locale.languageCode];
String get enterBeneficiaryAccountNo => localizedValues["enterBeneficiaryAccountNo"][locale.languageCode];
String get confirmPrescription => localizedValues["confirm-prescription"][locale.languageCode]; String get confirmPrescription => localizedValues["confirm-prescription"][locale.languageCode];
String get youAlreadyHaveOrder => localizedValues["you-already-have-order"][locale.languageCode]; String get youAlreadyHaveOrder => localizedValues["you-already-have-order"][locale.languageCode];
String get orderOverview => localizedValues["order-overview"][locale.languageCode]; String get orderOverview => localizedValues["order-overview"][locale.languageCode];

Loading…
Cancel
Save