Issue's fixes

mirza_dev
devmirza121 4 years ago
parent 4b8422617f
commit 4a8c27821c

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

@ -2,6 +2,8 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:car_provider_app/api/client/user_api_client.dart';
import 'package:car_provider_app/classes/app_state.dart';
import 'package:flutter/foundation.dart';
import 'package:http/http.dart';
import 'package:http/io_client.dart';
@ -72,6 +74,7 @@ class ApiClient {
print("res121:" + response.statusCode.toString());
}
var jsonData = jsonDecode(response.body);
return factoryConstructor(jsonData);
} catch (ex) {
print(ex);
@ -127,6 +130,12 @@ class ApiClient {
print("res: " + response.body);
}
if (response.statusCode >= 200 && response.statusCode < 500) {
var jsonData = jsonDecode(response.body);
if (jsonData["StatusMessage"] != null && jsonData["StatusMessage"] == "Unauthorized user attempt to access API") {
String mToken = await UserApiClent().UpdateUserToken();
return await _postForResponse(url, requestBody, token: mToken, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes);
}
return response;
} else {
throw _throwAPIException(response);
@ -157,7 +166,7 @@ class ApiClient {
} else {
throw APIException(APIException.OTHER, arguments: e);
}
}catch (ex) {
} catch (ex) {
print("exception1:" + ex.toString());
throw APIException(APIException.BAD_RESPONSE_FORMAT, arguments: ex);
}
@ -217,7 +226,10 @@ class ApiClient {
}
if (queryParameters != null) {
String queryString = new Uri(queryParameters: queryParameters).query;
url = url + '?' + queryString.toString();
if (!url.contains(queryString.toString())) {
url = url + '?' + queryString.toString();
}
// if (isFirstCall) url = url + '?' + queryString.toString();
}
if (!kReleaseMode) {
@ -225,11 +237,15 @@ class ApiClient {
print("queryParameters:$queryParameters");
}
var response = await _get(Uri.parse(url), headers: _headers).timeout(Duration(seconds: 60));
if (!kReleaseMode) {
print("res: " + response.body.toString());
}
if (response.statusCode >= 200 && response.statusCode < 300) {
if (response.statusCode >= 200 && response.statusCode < 500) {
var jsonData = jsonDecode(response.body);
if (jsonData["StatusMessage"] != null && jsonData["StatusMessage"] == "Unauthorized user attempt to access API") {
String mToken = await UserApiClent().UpdateUserToken();
return await _getForResponse(url, token: mToken, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes);
}
return response;
} else {
throw _throwAPIException(response);

@ -24,7 +24,21 @@ class BranchApiClent {
factory BranchApiClent() => _instance;
Future<Branch> fetchBranch() async {
var postParams = {
"serviceProviderID": AppState().getUser.data?.userInfo?.providerId.toString() ?? "",
};
String t = AppState().getUser.data!.accessToken ?? "";
print("tokeen " + t);
return await ApiClient().getJsonForObject((json) => Branch.fromJson(json), ApiConsts.getProviderBranch, queryParameters: postParams, token: t);
}
Future<MResponse> createBranch(String branchName, String branchDescription, String cityId, String address, String latitude, String longitude) async {
String lat = "0", long = "0";
try {
lat = latitude.substring(0, 9);
long = longitude.substring(0, 9);
} catch (e) {}
var postParams = {
// "id": 0,
"serviceProviderID": AppState().getUser.data?.userInfo?.providerId ?? "",
@ -32,8 +46,8 @@ class BranchApiClent {
"branchDescription": branchDescription,
"cityID": cityId,
"address": address,
"latitude": latitude.substring(0,9)??0,
"longitude": longitude.substring(0,9)??0,
"latitude": lat,
"longitude": long,
"isActive": true
};
String t = AppState().getUser.data!.accessToken ?? "";
@ -41,6 +55,35 @@ class BranchApiClent {
return await ApiClient().postJsonForObject((json) => MResponse.fromJson(json), ApiConsts.createProviderBranch, postParams, token: t);
}
Future<MResponse> updateBranch(int id, String branchName, String branchDescription, String cityId, String address, String latitude, String longitude, {bool isNeedToDelete = true}) async {
String lat = "0", long = "0";
try {
lat = latitude.substring(0, 9);
long = longitude.substring(0, 9);
} catch (e) {}
var postParams = {
"id": id,
"serviceProviderID": AppState().getUser.data?.userInfo?.providerId ?? "",
"branchName": branchName,
"branchDescription": branchDescription,
"cityID": cityId,
"address": address,
"latitude": lat,
"longitude": long,
"isActive": isNeedToDelete
};
String t = AppState().getUser.data!.accessToken ?? "";
print("tokeen " + t);
return await ApiClient().postJsonForObject((json) => MResponse.fromJson(json), ApiConsts.updateProviderBranch, postParams, token: t);
}
Future<MResponse> deleteBranch(int id) async {
var postParams = {"id": id, "serviceProviderID": AppState().getUser.data?.userInfo?.providerId ?? "", "isActive": false};
String t = AppState().getUser.data!.accessToken ?? "";
print("tokeen " + t);
return await ApiClient().postJsonForObject((json) => MResponse.fromJson(json), ApiConsts.updateProviderBranch, postParams, token: t);
}
Future<Branch> fetchAllBranches() async {
var postParams = {"ServiceProviderID": AppState().getUser.data?.userInfo?.providerId.toString() ?? ""};
String t = AppState().getUser.data!.accessToken ?? "";

@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'package:car_provider_app/models/user/change_email.dart';
import 'package:car_provider_app/models/user/change_mobile.dart';
import 'package:car_provider_app/models/user/cities.dart';
@ -22,9 +23,10 @@ import 'package:car_provider_app/models/user/register_user.dart';
import '../../classes/app_state.dart';
import '../../models/m_response.dart';
import '../../models/user/refresh_token.dart';
import '../../models/user/user.dart';
import '../api_client.dart';
import '../shared_prefrence.dart';
class UserApiClent {
static final UserApiClent _instance = UserApiClent._internal();
@ -49,9 +51,9 @@ class UserApiClent {
Future<RegisterUser> basicComplete(String userId, String firstName, String lastName, String email, String password) async {
var postParams;
if(email.isEmpty){
if (email.isEmpty) {
postParams = {"userID": userId, "firstName": firstName, "lastName": lastName, "companyName": "string", "isEmailVerified": true, "password": password};
}else{
} else {
postParams = {"userID": userId, "firstName": firstName, "lastName": lastName, "email": email, "companyName": "string", "isEmailVerified": true, "password": password};
}
@ -108,7 +110,7 @@ class UserApiClent {
Future<Response> ForgetPasswordOTPCompare(String userToken, String userOTP) async {
var postParams = {"userToken": userToken, "userOTP": userOTP};
return await ApiClient().postJsonForResponse(ApiConsts.ForgetPasswordOTPCompare, postParams);
// return await ApiClient().postJsonForObject((json) => PasswordOTPCompare.fromJson(json), ApiConsts.ForgetPasswordOTPCompare, postParams);
// return await ApiClient().postJsonForObject((json) => PasswordOTPCompare.fromJson(json), ApiConsts.ForgetPasswordOTPCompare, postParams);
}
Future<Response> ForgetPassword(String userToken, String newPassword) async {
@ -130,7 +132,6 @@ class UserApiClent {
String t = AppState().getUser.data!.accessToken ?? "";
print("tokeen " + t);
return await ApiClient().postJsonForObject((json) => MResponse.fromJson(json), ApiConsts.ChangePassword, postParams, token: t);
}
Future<ChangeMobile> ChangeMobileNoOTPRequest(
@ -177,9 +178,7 @@ class UserApiClent {
}
Future<MResponse> EmailVerifyOTPVerify(String userToken, String userOTP) async {
var postParams =
{"userToken": userToken,
"userOTP": userOTP};
var postParams = {"userToken": userToken, "userOTP": userOTP};
String t = AppState().getUser.data!.accessToken ?? "";
return await ApiClient().postJsonForObject((json) => MResponse.fromJson(json), ApiConsts.EmailVerifyOTPVerify, postParams, token: t);
@ -202,4 +201,24 @@ class UserApiClent {
print("tokeen " + t);
return await ApiClient().postJsonForObject((json) => ImageResponse.fromJson(json), ApiConsts.UpdateUserImage, postParams, token: t);
}
Future<RefreshToken> RefreshTokenAPI(String token, String refreshToken) async {
var postParams = {"token": token, "refreshToken": refreshToken};
// String t = AppState().getUser.data!.accessToken ?? "";
return await ApiClient().postJsonForObject((json) => RefreshToken.fromJson(json), ApiConsts.RefreshToken, postParams);
}
Future<String> UpdateUserToken() async {
String token = await SharedPrefManager.getUserToken();
String refreshToken = await SharedPrefManager.getRefreshToken();
RefreshToken refresh = await RefreshTokenAPI(token, refreshToken);
SharedPrefManager.setUserToken(refresh.data!.accessToken ?? "");
SharedPrefManager.setRefreshToken(refresh.data!.refreshToken ?? "");
String mdata = await SharedPrefManager.getData();
UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
User user = new User();
user.data = new UserData(accessToken: refresh.data!.accessToken ?? "", refreshToken: refresh.data!.refreshToken ?? "", userInfo: info);
AppState().setUser = user;
return refresh.data!.accessToken??"";
}
}

@ -7,6 +7,8 @@ class SharedPrefManager {
static String USER_TOKEN = "user.token";
static String USER_NAME = "user.name";
static String PASSWORD = "user.password";
static String REFRESH_TOKEN = "user.refresh.token";
static String DATA = "data";
static Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
@ -49,4 +51,24 @@ class SharedPrefManager {
SharedPreferences prefs = await _prefs;
return prefs.getString(PASSWORD) ?? "";
}
static setRefreshToken(String cookie) async {
final prefs = await SharedPreferences.getInstance();
prefs.setString(REFRESH_TOKEN, cookie) ?? "NA";
}
static Future<String> getRefreshToken() async {
SharedPreferences prefs = await _prefs;
return prefs.getString(REFRESH_TOKEN) ?? "";
}
static setData(String cookie) async {
final prefs = await SharedPreferences.getInstance();
prefs.setString(DATA, cookie) ?? "NA";
}
static Future<String> getData() async {
SharedPreferences prefs = await _prefs;
return prefs.getString(DATA) ?? "";
}
}

@ -5,6 +5,7 @@ class ApiConsts {
static String BasicOTP = baseUrlServices + "api/Register/BasicOTP";
static String BasicVerify = baseUrlServices + "api/Register/BasicVerify";
static String BasicComplete = baseUrlServices + "api/Register/BasicComplete";
static String RefreshToken = baseUrlServices + "api/Account/RefreshToken";
//User
@ -36,7 +37,9 @@ class ApiConsts {
static String ServiceProviderDocument_Update = baseUrlServices + "api/ServiceProviders/ServiceProviderDocument_Update";
//Branch
static String getProviderBranch = baseUrlServices + "api/ServiceProviders/ServiceProviderBranch_Get";
static String createProviderBranch = baseUrlServices + "api/ServiceProviders/ServiceProviderBranch_Create";
static String updateProviderBranch = baseUrlServices + "api/ServiceProviders/ServiceProviderBranch_Update";
static String ServiceProviderBranchGet = baseUrlServices + "api/ServiceProviders/ServiceProviderBranch_Get";
static String ServiceCategory_Get = baseUrlServices + "api/Master/ServiceCategory_Get";
static String Services_Get = baseUrlServices + "api/ServiceProviders/Services_Get";

@ -1,5 +1,7 @@
import 'package:car_provider_app/models/profile/branch.dart';
import 'package:car_provider_app/models/user/register_user.dart';
import 'package:car_provider_app/pages/dashboard/dashboard_page.dart';
import 'package:car_provider_app/pages/settings/branch_detail_page.dart';
import 'package:car_provider_app/pages/settings/create_services_page.dart';
import 'package:car_provider_app/pages/settings/dealership_page.dart';
import 'package:car_provider_app/pages/settings/define_branch_page.dart';
@ -52,6 +54,7 @@ class AppRoutes {
//settings
static final String dealershipSetting = "/dealershipSetting";
static final String branch = "/branch";
static final String defineBranch = "/defineBranch";
static final String createServices = "/createServices";
@ -77,14 +80,15 @@ class AppRoutes {
changePassword: (context) => ChangePasswordPage(),
forgetPasswordMethodPage: (context) => ForgetPasswordMethodPage(ModalRoute.of(context)!.settings.arguments as String),
changeMobilePage: (context) => ChangeMobilePage(),
changeEmailPage : (context) => ChangeEmailPage(),
editAccoundPage : (context) => EditAccountPage(),
changeEmailPage: (context) => ChangeEmailPage(),
editAccoundPage: (context) => EditAccountPage(),
//Home page
dashboard: (context) => DashboardPage(),
//setting
dealershipSetting: (context) => DealershipPage(),
defineBranch: (context) => DefineBranchPage(),
branch: (context) => BranchDetailPage(),
defineBranch: (context) => DefineBranchPage(ModalRoute.of(context)!.settings.arguments as BranchData),
createServices: (context) => CreateServicesPage(),
};
}

@ -107,7 +107,7 @@ class CodegenLoader extends AssetLoader{
"completeProfile1": "اكمل الملف الشخصي 1/3",
"completeProfile2": "اكمل الملف الشخصي 2/3",
"completeProfile3": "اكمل الملف الشخصي 3/3",
"userInformation": "User Information",
"userInformation": "معلومات المتسخدم",
"provider": "Provider",
"title": "Hello",
"msg": "Hello {} in the {} world ",
@ -233,7 +233,7 @@ static const Map<String,dynamic> en_US = {
"update": "Update",
"termsOfService": "By creating an account you agree to our Terms of Service and\n Privacy Policy",
"branchInfo": "Branch Info and Services",
"profileCompleted": "Profile Completed",
"profileCompleted": "Profile is Completed",
"selectLocationMap": "Select Location Map",
"licensesAndCertifications": "licenses & certifications",
"completeProfile1": "Complete Profile 1/3",

@ -19,7 +19,8 @@ Future<void> main() async {
Locale('en', 'US')
],
fallbackLocale: Locale('ar', 'SA'),
fallbackLocale: Locale('en', 'US'),
// startLocale: Locale('ar', 'SA'),
path: 'resources/langs',
child: MyApp(),
),

@ -42,6 +42,7 @@ class BranchData {
this.serviceProviderId,
this.branchName,
this.branchDescription,
this.countryID,
this.cityId,
this.address,
this.latitude,
@ -53,17 +54,20 @@ class BranchData {
int? serviceProviderId;
String? branchName;
String? branchDescription;
int? countryID;
int? cityId;
String? address;
String? latitude;
String? longitude;
int? status;
factory BranchData.fromJson(Map<String, dynamic> json) => BranchData(
id: json["id"] == null ? null : json["id"],
serviceProviderId: json["serviceProviderID"] == null ? null : json["serviceProviderID"],
branchName: json["branchName"] == null ? null : json["branchName"],
branchDescription: json["branchDescription"] == null ? null : json["branchDescription"],
countryID: json["countryID"] == null ? null : json["countryID"],
cityId: json["cityID"] == null ? null : json["cityID"],
address: json["address"] == null ? null : json["address"],
latitude: json["latitude"] == null ? null : json["latitude"],

@ -0,0 +1,65 @@
// To parse this JSON data, do
//
// final refreshToken = refreshTokenFromJson(jsonString);
import 'dart:convert';
RefreshToken refreshTokenFromJson(String str) => RefreshToken.fromJson(json.decode(str));
String refreshTokenToJson(RefreshToken data) => json.encode(data.toJson());
class RefreshToken {
RefreshToken({
this.totalItemsCount,
this.data,
this.messageStatus,
this.message,
});
final dynamic? totalItemsCount;
final RefreshData? data;
final int? messageStatus;
final String? message;
factory RefreshToken.fromJson(Map<String, dynamic> json) => RefreshToken(
totalItemsCount: json["totalItemsCount"],
data: json["data"] == null ? null : RefreshData.fromJson(json["data"]),
messageStatus: json["messageStatus"] == null ? null : json["messageStatus"],
message: json["message"] == null ? null : json["message"],
);
Map<String, dynamic> toJson() => {
"totalItemsCount": totalItemsCount,
"data": data == null ? null : data!.toJson(),
"messageStatus": messageStatus == null ? null : messageStatus,
"message": message == null ? null : message,
};
}
class RefreshData {
RefreshData({
this.accessToken,
this.refreshToken,
this.expiryDate,
this.userInfo,
});
final String? accessToken;
final String? refreshToken;
final DateTime? expiryDate;
final dynamic? userInfo;
factory RefreshData.fromJson(Map<String, dynamic> json) => RefreshData(
accessToken: json["accessToken"] == null ? null : json["accessToken"],
refreshToken: json["refreshToken"] == null ? null : json["refreshToken"],
expiryDate: json["expiryDate"] == null ? null : DateTime.parse(json["expiryDate"]),
userInfo: json["userInfo"],
);
Map<String, dynamic> toJson() => {
"accessToken": accessToken == null ? null : accessToken,
"refreshToken": refreshToken == null ? null : refreshToken,
"expiryDate": expiryDate == null ? null : expiryDate!.toIso8601String(),
"userInfo": userInfo,
};
}

@ -17,13 +17,13 @@ class User {
});
dynamic totalItemsCount;
Data? data;
UserData? data;
int? messageStatus;
String? message;
factory User.fromJson(Map<String, dynamic> json) => User(
totalItemsCount: json["totalItemsCount"],
data: json["data"] == null ? null : Data.fromJson(json["data"]),
data: json["data"] == null ? null : UserData.fromJson(json["data"]),
messageStatus: json["messageStatus"] == null ? null : json["messageStatus"],
message: json["message"] == null ? null : json["message"],
);
@ -36,8 +36,8 @@ class User {
};
}
class Data {
Data({
class UserData {
UserData({
this.accessToken,
this.refreshToken,
this.expiryDate,
@ -49,7 +49,7 @@ class Data {
DateTime? expiryDate;
UserInfo? userInfo;
factory Data.fromJson(Map<String, dynamic> json) => Data(
factory UserData.fromJson(Map<String, dynamic> json) => UserData(
accessToken: json["accessToken"] == null ? null : json["accessToken"],
refreshToken: json["refreshToken"] == null ? null : json["refreshToken"],
expiryDate: json["expiryDate"] == null ? null : DateTime.parse(json["expiryDate"]),

@ -15,12 +15,16 @@ import 'package:car_provider_app/widgets/show_fill_button.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:car_provider_app/extensions/string_extensions.dart';
import 'package:car_provider_app/extensions/widget_extensions.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:http/http.dart';
import 'package:image_picker/image_picker.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'dart:io';
import '../../generated/locale_keys.g.dart';
class DashboardPage extends StatefulWidget {
@override
State<DashboardPage> createState() => _DashboardPageState();
@ -56,13 +60,13 @@ class _DashboardPageState extends State<DashboardPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: appBar(
title: "Logo/Brand",
title: LocaleKeys.logo_brand.tr(),
),
drawer: showDrawer(context),
body: Container(
child: Container(
child: Center(
child: "Dashboard/Main Page".toText24(),
child: LocaleKeys.dashboard_main.tr().toText24(),
),
),
),
@ -156,12 +160,12 @@ class _DashboardPageState extends State<DashboardPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
userName.toText24(),
"User role or title".toText12(),
AppState().getUser.data!.userInfo!.roleName!.toText12(),
],
),
),
ShowFillButton(
title: "EDIT",
title: LocaleKeys.edit.tr(),
onPressed: () {
navigateWithName(context, AppRoutes.editAccoundPage);
},
@ -171,26 +175,41 @@ class _DashboardPageState extends State<DashboardPage> {
),
ListTile(
leading: SvgPicture.asset("assets/images/ic_notification.svg"),
title: "Notifications".toText12(),
title: LocaleKeys.notifications.tr().toText12(),
),
ListTile(
leading: SvgPicture.asset("assets/images/ic_settings.svg"),
title: "General".toText12(),
title: LocaleKeys.general.tr().toText12(),
),
ListTile(
leading: SvgPicture.asset("assets/images/ic_notes.svg"),
title: "Define Licenses".toText12(),
title: LocaleKeys.defineLicences.tr().toText12(),
onTap: () {
navigateWithName(context, AppRoutes.defineLicense);
},
),
ListTile(
leading: SvgPicture.asset("assets/images/ic_car.svg"),
title: "Dealership Settings".toText12(),
title: LocaleKeys.dealershipSettings.tr().toText12(),
onTap: () {
navigateWithName(context, AppRoutes.dealershipSetting);
},
),
ListTile(
leading: Image.asset(
"assets/images/ic_world.png",
width: 20,
height: 20,
color: Colors.blue,
),
title: LocaleKeys.english.tr().toText12(),
onTap: () {
if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA")
context.setLocale(const Locale("en", "US"));
else
context.setLocale(const Locale('ar', 'SA'));
},
),
// ListTile(
// leading: SvgPicture.asset("assets/images/ic_lock.svg"),
// title: "Change Password".toText12(),
@ -214,8 +233,10 @@ class _DashboardPageState extends State<DashboardPage> {
// ),
ListTile(
leading: SvgPicture.asset("assets/images/ic_logout.svg"),
title: "Sign Out".toText12(),
onTap: () {
title: LocaleKeys.signOut.tr().toText12(),
onTap: () async {
final pref = await SharedPreferences.getInstance();
await pref.clear();
pop(context);
pop(context);
},

@ -0,0 +1,146 @@
import 'package:car_provider_app/api/client/branch_api_client.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import '../../classes/utils.dart';
import '../../config/routes.dart';
import '../../generated/locale_keys.g.dart';
import '../../models/m_response.dart';
import '../../models/profile/branch.dart';
import '../../utils/navigator.dart';
import '../../widgets/show_fill_button.dart';
class BranchDetailPage extends StatefulWidget {
@override
State<BranchDetailPage> createState() => _BranchDetailPageState();
}
class _BranchDetailPageState extends State<BranchDetailPage> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
LocaleKeys.defineBranches.tr(),
),
),
body: Container(
width: double.infinity,
height: double.infinity,
child: Column(
children: [
Expanded(
child: FutureBuilder<Branch>(
future: BranchApiClent().fetchBranch(),
builder: (context, snapshot) {
if (snapshot.hasData) {
return snapshot.data!.data!.length == 0
? Center(child: Text(LocaleKeys.no_branch.tr()))
: ListView.separated(
itemBuilder: (context, index) {
return Row(
children: [
Container(
width: 44,
height: 44,
color: Colors.blue,
padding: EdgeInsets.all(6),
child: SvgPicture.asset(
"assets/icons/ic_branchs.svg",
color: Colors.white,
),
),
12.width,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
snapshot.data!.data![index].branchName ?? "",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
8.height,
Text(
snapshot.data!.data![index].address ?? "N/A",
style: TextStyle(
fontSize: 16,
),
),
],
),
),
ShowFillButton(
title: LocaleKeys.edit.tr(),
fontSize: 12,
width: 50,
height: 30,
horizontalPadding: 8,
onPressed: () async {
await navigateWithName(context, AppRoutes.defineBranch, arguments: snapshot.data!.data![index]);
setState(() {});
},
),
12.width,
ShowFillButton(
title: LocaleKeys.remove.tr(),
fontSize: 12,
width: 50,
height: 30,
horizontalPadding: 8,
onPressed: () async {
Utils.showLoading(context);
MResponse res =
await BranchApiClent().updateBranch(snapshot.data!.data![index].id ?? 0, snapshot.data!.data![index].branchName??"", snapshot.data!.data![index].branchDescription??"", snapshot.data!.data![index].cityId.toString(), snapshot.data!.data![index].address??"", snapshot.data!.data![index].latitude.toString(), snapshot.data!.data![index].longitude.toString(),isNeedToDelete: false);
Utils.hideLoading(context);
if (res.messageStatus == 1) {
Utils.showToast(LocaleKeys.branch_deleted.tr());
setState(() {});
} else {
Utils.showToast(res.message ?? "");
}
},
)
],
);
},
separatorBuilder: (context, index) {
return 12.height;
},
itemCount: snapshot.data!.data!.length,
padding: EdgeInsets.all(12),
);
} else {
return Center(
child: CircularProgressIndicator(),
);
}
},
)),
Padding(
padding: const EdgeInsets.all(12.0),
child: ShowFillButton(
title: LocaleKeys.createBranch.tr(),
onPressed: () async {
await navigateWithName(context, AppRoutes.defineBranch, arguments: new BranchData());
setState(() {});
},
),
)
],
),
),
);
}
}

@ -8,6 +8,7 @@ import 'package:car_provider_app/models/profile/services.dart';
import 'package:car_provider_app/models/user/country.dart';
import 'package:car_provider_app/widgets/dropdown/dropdow_field.dart';
import 'package:car_provider_app/widgets/show_fill_button.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
@ -49,7 +50,7 @@ class _CreateServicesPageState extends State<CreateServicesPage> {
category = await BranchApiClent().fetchBranchCategory();
setState(() {
category!.data?.forEach((element) {
categoryDropList.add(new DropValue(element.id ?? 0, ((element.categoryName!.isEmpty ? "N/A" : element.categoryName) ?? "N/A"), ""));
categoryDropList.add(new DropValue(element.id ?? 0, ((element.categoryName!.isEmpty ? "N/A" :EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"? element.categoryNameN:element.categoryName) ?? "N/A"), ""));
});
});
}
@ -118,7 +119,7 @@ class _CreateServicesPageState extends State<CreateServicesPage> {
},
),
12.width,
(services!.data![index].description ?? "").toText12()
((EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"?services!.data![index].descriptionN:services!.data![index].description) ?? "").toText12()
],
),
);

@ -26,7 +26,7 @@ class DealershipPage extends StatelessWidget {
leading: SvgPicture.asset("assets/icons/ic_branchs.svg"),
title: LocaleKeys.defineBranches.tr().toText12(),
onTap: () {
navigateWithName(context, AppRoutes.defineBranch);
navigateWithName(context, AppRoutes.branch);
},
),
ListTile(

@ -3,6 +3,7 @@ import 'package:car_provider_app/api/client/user_api_client.dart';
import 'package:car_provider_app/classes/utils.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:car_provider_app/models/m_response.dart';
import 'package:car_provider_app/models/profile/branch.dart';
import 'package:car_provider_app/models/user/cities.dart';
import 'package:car_provider_app/models/user/country.dart';
import 'package:car_provider_app/pages/location/pick_location_page.dart';
@ -10,9 +11,16 @@ import 'package:car_provider_app/utils/utils.dart';
import 'package:car_provider_app/widgets/dropdown/dropdow_field.dart';
import 'package:car_provider_app/widgets/show_fill_button.dart';
import 'package:car_provider_app/widgets/txt_field.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import '../../generated/locale_keys.g.dart';
class DefineBranchPage extends StatefulWidget {
BranchData branchData;
DefineBranchPage(this.branchData);
@override
State<DefineBranchPage> createState() => _DefineBranchPageState();
}
@ -24,6 +32,8 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
List<DropValue> countryDropList = [];
List<DropValue> citiesDropList = [];
DropValue? countryValue;
DropValue? cityValue;
Country? country;
Cities? cities;
@ -32,6 +42,7 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
void initState() {
// TODO: implement initState
super.initState();
fetchCountry();
}
@ -39,8 +50,16 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
country = await UserApiClent().getAllCountries();
setState(() {
country!.data?.forEach((element) {
countryDropList.add(new DropValue(element.id ?? 0, (element.countryName ?? "") + " " + (element.countryCode ?? ""), element.countryCode ?? ""));
if (widget.branchData.id != null) {
if (element.id == widget.branchData.countryID) {
countryValue = new DropValue(
element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? (element.countryNameN ?? "") : (element.countryName ?? ""), element.countryCode ?? "");
}
}
countryDropList.add(
new DropValue(element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? (element.countryNameN ?? "") : (element.countryName ?? ""), element.countryCode ?? ""));
});
if (widget.branchData.id != null) fetchCites();
});
}
@ -52,7 +71,21 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
cities = await UserApiClent().getAllCites(countryId.toString());
setState(() {
cities!.data?.forEach((element) {
citiesDropList.add(new DropValue(element.id ?? 0, (element.cityName ?? ""), element.id.toString() ?? ""));
if (widget.branchData.id != null) {
if (element.id == widget.branchData.cityId) {
address = widget.branchData.address!;
branchName = widget.branchData.branchName!;
branchDescription = widget.branchData.branchDescription!;
latitude = double.parse(widget.branchData.latitude ?? "");
longitude = double.parse(widget.branchData.longitude ?? "");
countryId = widget.branchData.countryID!;
cityId = widget.branchData.cityId!;
cityValue =
new DropValue(element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? (element.cityNameN ?? "") : (element.cityName ?? ""), element.id.toString() ?? "");
}
}
citiesDropList
.add(new DropValue(element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? (element.cityNameN ?? "") : (element.cityName ?? ""), element.id.toString() ?? ""));
});
});
}
@ -62,7 +95,7 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
return Scaffold(
appBar: AppBar(
title: Text(
"Define Branch",
LocaleKeys.defineBranches.tr(),
),
),
body: Container(
@ -77,32 +110,42 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
child: Column(
children: [
country != null
? DropdownField((DropValue value) {
setState(() {
countryCode = value.subValue;
countryId = value.id;
fetchCites();
});
}, list: countryDropList, hint: "Chosse Country")
? DropdownField(
(DropValue value) {
setState(() {
countryCode = value.subValue;
countryId = value.id;
fetchCites();
});
},
list: countryDropList,
dropdownValue: countryValue,
hint: LocaleKeys.chooseCountry.tr() + "*",
)
: CircularProgressIndicator(),
12.height,
if (countryId != -1)
cities != null
? citiesDropList.length == 0
? Text("No City Available for this country")
: DropdownField((DropValue value) {
setState(() {
// countryCode = value.subValue;
cityId = value.id;
});
}, list: citiesDropList, hint: "Chosse City")
? Text(LocaleKeys.no_city_available.tr())
: DropdownField(
(DropValue value) {
setState(() {
// countryCode = value.subValue;
cityId = value.id;
});
},
list: citiesDropList,
dropdownValue: cityValue,
hint: LocaleKeys.chooseCity.tr() + "*",
)
: CircularProgressIndicator(),
12.height,
if (cityId != -1)
Column(
children: [
TxtField(
hint: "Branch Name",
hint: LocaleKeys.branchName.tr() + "*",
value: branchName,
onChanged: (v) {
branchName = v;
@ -110,7 +153,7 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
),
12.height,
TxtField(
hint: "Branch Description",
hint: LocaleKeys.branchDescription.tr() + "*",
value: branchDescription,
onChanged: (v) {
branchDescription = v;
@ -118,15 +161,17 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
),
12.height,
TxtField(
hint: "Address",
isNeedClickAll: true,
hint: LocaleKeys.address.tr(),
isNeedClickAll: false,
maxLines: 5,
value: address,
// onChanged: (v) {},
onChanged: (v) {
address = v;
},
),
12.height,
ShowFillButton(
title: "Pick Address",
title: LocaleKeys.pickAddress.tr(),
onPressed: () {
navigateTo(
context,
@ -152,12 +197,28 @@ class _DefineBranchPageState extends State<DefineBranchPage> {
Padding(
padding: const EdgeInsets.all(12.0),
child: ShowFillButton(
title: "Create Branch",
title: widget.branchData.id == null ? LocaleKeys.createBranch.tr() : LocaleKeys.updateBranch.tr(),
onPressed: () async {
Utils.showLoading(context);
MResponse res = await BranchApiClent().createBranch(branchName, branchDescription, cityId.toString(), address, latitude.toString(), longitude.toString());
Utils.hideLoading(context);
Utils.showToast(res.message ?? "");
if (widget.branchData.id == null) {
Utils.showLoading(context);
MResponse res = await BranchApiClent().createBranch(branchName, branchDescription, cityId.toString(), address, latitude.toString(), longitude.toString());
Utils.hideLoading(context);
if (res.messageStatus == 1) {
Utils.showToast(LocaleKeys.branch_created.tr());
} else {
Utils.showToast(res.message ?? "");
}
} else {
Utils.showLoading(context);
MResponse res =
await BranchApiClent().updateBranch(widget.branchData.id ?? 0, branchName, branchDescription, cityId.toString(), address, latitude.toString(), longitude.toString());
Utils.hideLoading(context);
if (res.messageStatus == 1) {
Utils.showToast(LocaleKeys.branch_updated.tr());
} else {
Utils.showToast(res.message ?? "");
}
}
},
),
),

@ -8,10 +8,12 @@ import 'package:car_provider_app/models/profile/document.dart';
import 'package:car_provider_app/utils/utils.dart';
import 'package:car_provider_app/widgets/show_fill_button.dart';
import 'package:car_provider_app/widgets/txt_field.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import '../../generated/locale_keys.g.dart';
class DefineLicensePage extends StatefulWidget {
@override
@ -37,7 +39,7 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Define Licenses"),
title: Text(LocaleKeys.defineLicences.tr()),
),
body: Container(
width: double.infinity,
@ -50,18 +52,18 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
Padding(
padding: const EdgeInsets.all(12.0),
child: ShowFillButton(
title: "Update",
title: LocaleKeys.update.tr(),
width: double.infinity,
onPressed: () {
Utils.showLoading(context);
ProfileApiClent().serviceProviderDocumentsUpdate(document!.data).then((value) {
Utils.hideLoading(context);
if (value.messageStatus == 1) {
Utils.showToast("Documents uploaded successfully");
if (AppState().getUser.data!.userInfo!.roleId == 5) {
if (validation()) {
updateDocument();
} else {
Utils.showToast(value.message ?? "");
Utils.showToast("All document's are mandatory for Dealership Provider");
}
});
} else {
updateDocument();
}
},
),
),
@ -71,10 +73,32 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
);
}
validation() {
bool valid = true;
document!.data!.forEach((element) {
if (element.documentUrl == null) {
valid = false;
}
});
return valid;
}
updateDocument() {
Utils.showLoading(context);
ProfileApiClent().serviceProviderDocumentsUpdate(document!.data).then((value) {
Utils.hideLoading(context);
if (value.messageStatus == 1) {
Utils.showToast("Documents uploaded successfully");
} else {
Utils.showToast(value.message ?? "");
}
});
}
Widget showWidget() {
if (document != null) {
return document!.data!.length == 0
? Text("Something went wrong")
? Text(LocaleKeys.somethingWrong.tr())
: ListView.separated(
itemBuilder: (context, index) {
return Column(
@ -85,7 +109,7 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
children: [
Flexible(
child: TxtField(
hint: "Select Attachment",
hint: LocaleKeys.selectAttachment.tr(),
value: document?.data![index].documentUrl ?? "",
isNeedClickAll: true,
maxLines: 2,

@ -1,7 +1,6 @@
import 'package:car_provider_app/api/client/user_api_client.dart';
import 'package:car_provider_app/classes/utils.dart';
import 'package:car_provider_app/config/routes.dart';
import 'package:car_provider_app/generated/locale_keys.g.dart';
import 'package:car_provider_app/models/m_response.dart';
import 'package:car_provider_app/models/user/basic_otp.dart';
import 'package:car_provider_app/models/user/register_user.dart';
@ -19,6 +18,8 @@ import 'package:car_provider_app/widgets/txt_field.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import '../../generated/locale_keys.g.dart';
class CompleteProfilePage extends StatefulWidget {
RegisterUser user;

@ -14,9 +14,12 @@ import 'package:car_provider_app/widgets/app_bar.dart';
import 'package:car_provider_app/widgets/dialog/dialogs.dart';
import 'package:car_provider_app/widgets/dialog/message_dialog.dart';
import 'package:car_provider_app/widgets/dialog/otp_dialog.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../../generated/locale_keys.g.dart';
class EditAccountPage extends StatefulWidget {
@override
State<EditAccountPage> createState() => _EditAccountPageState();
@ -29,7 +32,7 @@ class _EditAccountPageState extends State<EditAccountPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: appBar(title: "Edit Account"),
appBar: appBar(title: LocaleKeys.editAccount.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
@ -39,7 +42,7 @@ class _EditAccountPageState extends State<EditAccountPage> {
20.height,
ListTile(
leading: SvgPicture.asset("assets/images/ic_lock.svg"),
title: "Change Password".toText12(),
title: LocaleKeys.changePassword.tr().toText12(),
onTap: () {
navigateWithName(context, AppRoutes.changePassword);
},
@ -49,14 +52,14 @@ class _EditAccountPageState extends State<EditAccountPage> {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SvgPicture.asset("assets/images/ic_mobile.svg"),
"Change Mobile".toText12(),
"Verify".toText12(),
LocaleKeys.changeMobile.tr().toText12(),
LocaleKeys.verify.tr().toText12(),
RaisedButton(
onPressed: () {
navigateWithName(context, AppRoutes.changeMobilePage);
},
child: Text(
"Change",
LocaleKeys.change.tr(),
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
@ -75,9 +78,9 @@ class _EditAccountPageState extends State<EditAccountPage> {
Icons.email,
color: Colors.blue,
),
"Change Email".toText12(),
LocaleKeys.changeEmail.tr().toText12(),
InkWell(
child: ((AppState().getUser.data!.userInfo!.isEmailVerified ?? false) ? "Verified" : "Verify").toText12(),
child: ((AppState().getUser.data!.userInfo!.isEmailVerified ?? false) ? LocaleKeys.verified.tr() : LocaleKeys.verify.tr()).toText12(),
onTap: (AppState().getUser.data!.userInfo!.isEmailVerified ?? false)
? null
: () {
@ -89,7 +92,7 @@ class _EditAccountPageState extends State<EditAccountPage> {
navigateWithName(context, AppRoutes.changeEmailPage);
},
child: Text(
"Change",
LocaleKeys.change.tr(),
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
@ -135,7 +138,7 @@ class _EditAccountPageState extends State<EditAccountPage> {
if (otpCompare.messageStatus == 1) {
AppState().getUser.data!.userInfo!.isEmailVerified = true;
setState(() {});
Utils.showToast("Email is verified successfully");
Utils.showToast(LocaleKeys.emailVerified.tr());
// Navigator.of(context).pushNamedAndRemoveUntil(AppRoutes.dashboard, (Route<dynamic> route) => false);
// showMDialog(
// context,

@ -19,12 +19,14 @@ import 'package:car_provider_app/extensions/string_extensions.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:car_provider_app/extensions/widget_extensions.dart';
import 'package:car_provider_app/widgets/txt_field.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:car_provider_app/models/user/user.dart';
import 'dart:convert';
import 'package:http/http.dart';
import '../../generated/locale_keys.g.dart';
import '../../models/user/country.dart';
import '../../widgets/dropdown/dropdow_field.dart';
import '../../widgets/tab/login_email_tab.dart';
@ -57,7 +59,7 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: appBar(title: "Change Password"),
appBar: appBar(title: LocaleKeys.changePassword.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
@ -73,7 +75,7 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
},
),
50.height,
"Retrieve Password".toText24(),
LocaleKeys.retrievePassword.tr().toText24(),
12.height,
type == ClassType.NUMBER ? Column(children: [
getCountry(),
@ -85,7 +87,7 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
},
)
],) : TxtField(
hint: "Email Address",
hint: LocaleKeys.emailAddress.tr(),
value: userName,
onChanged: (v) {
userName = v;
@ -93,7 +95,7 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
),
50.height,
ShowFillButton(
title: "Continue",
title: LocaleKeys.continu.tr(),
width: double.infinity,
onPressed: () {
if (userName.isNum() && type==ClassType.NUMBER) {
@ -114,13 +116,18 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
if (_country != null) {
List<DropValue> dropList = [];
_country!.data?.forEach((element) {
dropList.add(new DropValue(element.id ?? 0, (element.countryName ?? "") + " " + (element.countryCode ?? ""), element.countryCode ?? ""));
dropList.add(new DropValue(
element.id ?? 0,
EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
? ((element.countryNameN ?? "") + " " + (element.countryCode ?? ""))
: (element.countryName ?? "") + " " + (element.countryCode ?? ""),
element.countryCode ?? ""));
});
return Padding(
padding: const EdgeInsets.all(2.0),
child: DropdownField((DropValue value) {
countryCode = value.subValue;
}, list: dropList, hint: "Chose Country"),
}, list: dropList, hint: LocaleKeys.chooseCountry.tr()),
);
} else {
return Center(
@ -148,7 +155,7 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
Utils.hideLoading(context);
PasswordOTPRequest otpRequest = PasswordOTPRequest.fromJson(jsonDecode(response.body));
if (otpRequest.messageStatus == 1) {
Utils.showToast("Code is sent to email");
Utils.showToast(LocaleKeys.codeSentToEmail.tr());
showMDialog(context, child: OtpDialog(
onClick: (String code) async {
pop(context);

@ -49,7 +49,7 @@ class LoginMethodSelectionPage extends StatelessWidget {
onClick: () {
performBasicOtp(context);
},
title: 'Finger Print',
title: LocaleKeys.fingerPrint.tr(),
icon: icons + "ic_fingerprint.png",
),
),
@ -59,7 +59,7 @@ class LoginMethodSelectionPage extends StatelessWidget {
onClick: () {
performBasicOtp(context);
},
title: 'Face Recognition',
title: LocaleKeys.faceRecognition.tr(),
icon: icons + "ic_face_id.png",
),
),
@ -73,7 +73,7 @@ class LoginMethodSelectionPage extends StatelessWidget {
onClick: () {
performBasicOtp(context);
},
title: 'With SMS',
title: LocaleKeys.SMS.tr(),
icon: icons + "ic_sms.png",
),
),
@ -84,7 +84,7 @@ class LoginMethodSelectionPage extends StatelessWidget {
// navigateWithName(context, AppRoutes.dashboard);
performBasicOtp(context);
},
title: 'With Whatsapp',
title: LocaleKeys.whatsapp.tr(),
icon: icons + "ic_whatsapp.png",
),
),
@ -107,24 +107,24 @@ class LoginMethodSelectionPage extends StatelessWidget {
onClick: (String code) async {
pop(context);
Utils.showLoading(context);
Response response2 = await UserApiClent().login_V2_OTPVerify(user.data!.userToken??"", code);
Response response2 = await UserApiClent().login_V2_OTPVerify(user.data!.userToken ?? "", code);
Utils.hideLoading(context);
RegisterUser verifiedUser = RegisterUser.fromJson(jsonDecode(response2.body));
if (verifiedUser.messageStatus == 1) {
User user = User.fromJson(jsonDecode(response2.body));
if(user.data!.userInfo!.roleId==5||user.data!.userInfo!.roleId==6){
if (user.data!.userInfo!.roleId == 5 || user.data!.userInfo!.roleId == 6) {
AppState().setUser = user;
SharedPrefManager.setUserToken(user.data!.accessToken ?? "");
SharedPrefManager.setUserId(user.data!.userInfo!.userId ?? "");
SharedPrefManager.setRefreshToken(user.data!.refreshToken ?? "");
SharedPrefManager.setData(jsonEncode(user.data!.userInfo!.toJson()));
navigateReplaceWithName(context, AppRoutes.dashboard);
}else{
} else {
Utils.showToast("Sorry, Only Provider's can log in this app");
}
} else {
Utils.showToast(verifiedUser.message??"");
Utils.showToast(verifiedUser.message ?? "");
}
},
));

@ -104,7 +104,7 @@ class _LoginVerificationPageState extends State<LoginVerificationPage> {
onClick: () {
performBasicOtp(context, userToken);
},
title: 'Finger Print',
title: LocaleKeys.fingerPrint.tr(),
icon: icons + "ic_fingerprint.png",
),
),
@ -114,7 +114,7 @@ class _LoginVerificationPageState extends State<LoginVerificationPage> {
onClick: () {
performBasicOtp(context, userToken);
},
title: 'Face Recognition',
title: LocaleKeys.faceRecognition.tr(),
icon: icons + "ic_face_id.png",
),
),
@ -128,7 +128,7 @@ class _LoginVerificationPageState extends State<LoginVerificationPage> {
onClick: () {
performBasicOtp(context, userToken);
},
title: 'With SMS',
title: LocaleKeys.SMS.tr(),
icon: icons + "ic_sms.png",
),
),
@ -138,7 +138,7 @@ class _LoginVerificationPageState extends State<LoginVerificationPage> {
onClick: () {
performBasicOtp(context, userToken);
},
title: 'With Whatsapp',
title: LocaleKeys.whatsapp.tr(),
icon: icons + "ic_whatsapp.png",
),
),

@ -21,9 +21,11 @@ import 'package:car_provider_app/extensions/widget_extensions.dart';
import 'package:car_provider_app/widgets/show_fill_button.dart';
import 'package:car_provider_app/widgets/tab/login_email_tab.dart';
import 'package:car_provider_app/widgets/txt_field.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import '../../generated/locale_keys.g.dart';
import '../../models/user/country.dart';
import '../../widgets/dropdown/dropdow_field.dart';
@ -55,7 +57,7 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: appBar(title: "Log In"),
appBar: appBar(title: LocaleKeys.login.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
@ -70,15 +72,14 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
},
),
50.height,
(type == ClassType.NUMBER ? "Enter Phone" : "Enter Email").toText24(),
(type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr()).toText24(),
mFlex(1),
Column(
children: [
if (type == ClassType.NUMBER)
getCountry(),
if (type == ClassType.NUMBER) getCountry(context),
6.height,
TxtField(
hint: type == ClassType.NUMBER ? "5********" : "Enter Email",
hint: type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr(),
value: phoneNum,
onChanged: (v) {
phoneNum = v;
@ -86,7 +87,7 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
),
6.height,
TxtField(
hint: "Enter Password?",
hint: LocaleKeys.EnterPass.tr(),
value: password,
isPasswordEnabled: true,
maxLines: 1,
@ -100,14 +101,14 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
"Forget Password?".toText12(color: Colors.blue).onPress(() {
LocaleKeys.forgetPassword.tr().toText12(color: Colors.blue).onPress(() {
navigateWithName(context, AppRoutes.forgetPassword);
}),
],
),
50.height,
ShowFillButton(
title: "Log In",
title: LocaleKeys.login.tr(),
width: double.infinity,
onPressed: () {
performBasicOtp(context);
@ -120,17 +121,26 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
);
}
Widget getCountry() {
Widget getCountry(BuildContext context) {
if (_country != null) {
List<DropValue> dropList = [];
_country!.data?.forEach((element) {
dropList.add(new DropValue(element.id ?? 0, (element.countryName ?? "") + " " + (element.countryCode ?? ""), element.countryCode ?? ""));
dropList.add(new DropValue(
element.id ?? 0,
EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
? ((element.countryNameN ?? "") + " " + (element.countryCode ?? ""))
: (element.countryName ?? "") + " " + (element.countryCode ?? ""),
element.countryCode ?? ""));
});
return Padding(
padding: const EdgeInsets.all(2.0),
child: DropdownField((DropValue value) {
countryCode = value.subValue;
}, list: dropList, hint: "Chose Country"),
child: DropdownField(
(DropValue value) {
countryCode = value.subValue;
},
list: dropList,
hint: LocaleKeys.chooseCountry.tr(),
),
);
} else {
return Center(
@ -152,5 +162,4 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
Utils.showToast(user.message ?? "");
}
}
}

@ -18,8 +18,11 @@ import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:car_provider_app/extensions/string_extensions.dart';
import 'package:car_provider_app/extensions/widget_extensions.dart';
import 'package:car_provider_app/widgets/txt_field.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import '../../generated/locale_keys.g.dart';
class RegisterPage extends StatelessWidget {
String phoneNum = "", countryCode = "";
int role = -1, countryId = -1;
@ -27,14 +30,14 @@ class RegisterPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: appBar(title: "Sign Up"),
appBar: appBar(title: LocaleKeys.signUp.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
padding: EdgeInsets.all(40),
child: Column(
children: [
"Enter Phone Number".toText24(),
LocaleKeys.enterPhoneNumber.tr().toText24(),
12.height,
FutureBuilder<Role>(
future: UserApiClent().getRoles(),
@ -42,11 +45,11 @@ class RegisterPage extends StatelessWidget {
if (snapshot.hasData) {
List<DropValue> dropList = [];
snapshot.data?.data?.forEach((element) {
dropList.add(new DropValue(element.id ?? 0, element.roleName ?? "", ""));
dropList.add(new DropValue(element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? element.roleNameN ?? "" : element.roleName ?? "", ""));
});
return DropdownField((DropValue value) {
role = value.id;
}, list: dropList, hint: "Chosse Role");
}, list: dropList, hint: LocaleKeys.selectRole.tr());
} else {
return CircularProgressIndicator();
}
@ -59,12 +62,17 @@ class RegisterPage extends StatelessWidget {
if (snapshot.hasData) {
List<DropValue> dropList = [];
snapshot.data?.data?.forEach((element) {
dropList.add(new DropValue(element.id ?? 0, (element.countryName ?? "") + " " + (element.countryCode ?? ""), element.countryCode ?? ""));
dropList.add(new DropValue(
element.id ?? 0,
EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
? (element.countryNameN ?? "") + " " + (element.countryCode ?? "")
: (element.countryName ?? "") + " " + (element.countryCode ?? ""),
element.countryCode ?? ""));
});
return DropdownField((DropValue value) {
countryCode = value.subValue;
countryId = value.id;
}, list: dropList, hint: "Chose Country");
}, list: dropList, hint: LocaleKeys.chooseCountry.tr());
} else {
return CircularProgressIndicator();
}
@ -78,7 +86,7 @@ class RegisterPage extends StatelessWidget {
),
50.height,
ShowFillButton(
title: "Continue",
title: LocaleKeys.continu.tr(),
width: double.infinity,
onPressed: () {
if (validation()) performBasicOtp(context);

@ -1,14 +1,24 @@
import 'dart:async';
import 'dart:convert';
import 'package:car_provider_app/config/routes.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:car_provider_app/extensions/string_extensions.dart';
import 'package:car_provider_app/generated/locale_keys.g.dart';
import 'package:car_provider_app/utils/navigator.dart';
import 'package:car_provider_app/utils/utils.dart';
import 'package:car_provider_app/extensions/widget_extensions.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import '../../api/client/user_api_client.dart';
import '../../api/shared_prefrence.dart';
import '../../classes/app_state.dart';
import '../../classes/utils.dart';
import '../../models/user/refresh_token.dart';
import '../../models/user/user.dart';
class SplashPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
@ -21,13 +31,62 @@ class SplashPage extends StatelessWidget {
mFlex(5),
"Logo".toText(fontSize: 45, isBold: true),
mFlex(3),
LocaleKeys.firstTimeLogIn.tr().toText(fontSize: 18, isBold: true).onPress(() {
navigateWithName(context, AppRoutes.registerSelection);
}),
LocaleKeys.firstTimeLogIn.tr().toText(fontSize: 18, isBold: true).onPress(
() {
navigateWithName(context, AppRoutes.registerSelection);
},
),
mFlex(1),
LocaleKeys.alreadySigned.tr().toText(fontSize: 18, isBold: true).onPress(() {
navigateWithName(context, AppRoutes.loginVerification);
}),
LocaleKeys.alreadySigned.tr().toText(fontSize: 18, isBold: true).onPress(
() async {
String token = await SharedPrefManager.getUserToken();
String refreshToken = await SharedPrefManager.getRefreshToken();
if(token.isNotEmpty){
Utils.showLoading(context);
RefreshToken refresh = await UserApiClent().RefreshTokenAPI(token, refreshToken);
Utils.hideLoading(context);
if (refresh.messageStatus == 1) {
SharedPrefManager.setUserToken(refresh.data!.accessToken ?? "");
SharedPrefManager.setRefreshToken(refresh.data!.refreshToken ?? "");
String mdata = await SharedPrefManager.getData();
print(mdata);
UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
User user = new User();
user.data = new UserData(accessToken: refresh.data!.accessToken ?? "", refreshToken: refresh.data!.refreshToken ?? "", userInfo: info);
AppState().setUser = user;
print(AppState().getUser.data?.userInfo?.roleName);
navigateWithName(context, AppRoutes.dashboard);
} else {
String accessToken = await SharedPrefManager.getUserToken();
String refreshToken = await SharedPrefManager.getRefreshToken();
String mdata = await SharedPrefManager.getData();
UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
User user = new User();
user.data = new UserData(accessToken: accessToken, refreshToken: refreshToken, userInfo: info);
AppState().setUser = user;
print(AppState().getUser.data?.userInfo?.roleName);
navigateWithName(context, AppRoutes.dashboard);
}
}else{
Utils.showToast(LocaleKeys.login_once.tr());
}
},
),
35.height,
TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.white,
),
onPressed: () {
if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA")
context.setLocale(const Locale("en", "US"));
else
context.setLocale(const Locale('ar', 'SA'));
},
child: Text(
LocaleKeys.english.tr(),
),
),
mFlex(5),
],
),

@ -1,119 +0,0 @@
import 'dart:convert';
import 'package:car_provider_app/models/config_model.dart';
import 'package:shared_preferences/shared_preferences.dart'
as SharedPrefsPlugin;
///
/// Taken from AlarmGuide Project
///
abstract class ISharedPreferences {
Future<int?> get authState;
Future<void> setAuthState(int authState);
Future<int?> get configState;
Future<void> setConfigState(int confState);
Future<ConfigModel?> get config;
Future<void> setConfig(ConfigModel config);
Future<bool?> get promotionNotificationsEnabled;
Future<void> setPromotionNotificationEnabled(bool newSetting);
Future<bool?> get helpAlreadyShown;
Future<void> setHelpAlreadyShown();
Future<int?> get useS3;
Future<void> setUseS3(int value);
}
class SharedPreferences implements ISharedPreferences {
static const String _AUTH_STATE_KEY = "auth_key";
static const String _CONFIG_KEY = "config";
static const String _CONFIG_STATE_KEY = "config_key";
static const String _PROMOTION_NOTIFICATION_KEY = "promotion";
static const String _HELP_ALREADY_SHOWN = "help_shown";
static const String _USE_S3 = "s3";
@override
Future<int?> get authState async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
return sharedPrefs.getInt(_AUTH_STATE_KEY);
}
@override
Future<void> setAuthState(int authState) async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
sharedPrefs.setInt(_AUTH_STATE_KEY, authState);
}
@override
Future<ConfigModel?> get config async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
final configAsJson = sharedPrefs.getString(_CONFIG_KEY);
return ConfigModel.fromJson(jsonDecode(configAsJson!));
}
@override
Future<void> setConfig(ConfigModel config) async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
sharedPrefs.setString(_CONFIG_KEY, jsonEncode(config));
setConfigState(1);
}
@override
Future<bool?> get promotionNotificationsEnabled async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
return sharedPrefs.getBool(_PROMOTION_NOTIFICATION_KEY);
}
@override
Future<void> setPromotionNotificationEnabled(bool newSetting) async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
sharedPrefs.setBool(_PROMOTION_NOTIFICATION_KEY, newSetting);
}
@override
Future<bool?> get helpAlreadyShown async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
return sharedPrefs.getBool(_HELP_ALREADY_SHOWN);
}
@override
Future<void> setHelpAlreadyShown() async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
sharedPrefs.setBool(_HELP_ALREADY_SHOWN, true);
}
@override
Future<int?> get configState async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
return sharedPrefs.getInt(_CONFIG_STATE_KEY);
}
@override
Future<void> setConfigState(int confState) async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
sharedPrefs.setInt(_CONFIG_STATE_KEY, confState);
}
@override
Future<void> setUseS3(int value) async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
sharedPrefs.setInt(_USE_S3, value);
}
@override
Future<int?> get useS3 async {
final sharedPrefs = await SharedPrefsPlugin.SharedPreferences.getInstance();
return sharedPrefs.getInt(_USE_S3);
}
}

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
navigateWithName(BuildContext context, String routeName, {Object? arguments}) {
Navigator.pushNamed(context, routeName, arguments: arguments);
Future navigateWithName(BuildContext context, String routeName, {Object? arguments}) {
return Navigator.pushNamed(context, routeName, arguments: arguments);
}
navigateReplaceWithName(BuildContext context, String routeName, {Object? arguments}) {

@ -5,8 +5,10 @@ import 'package:car_provider_app/utils/utils.dart';
import 'package:car_provider_app/widgets/show_fill_button.dart';
import 'package:car_provider_app/extensions/string_extensions.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import '../../generated/locale_keys.g.dart';
import '../count_down_timer.dart';
import '../otp_widget.dart';
@ -35,7 +37,7 @@ class _OtpDialogState extends State<OtpDialog> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Please insert OTP Code".toText24(),
LocaleKeys.insert_otp_code.tr().toText24(),
20.height,
Center(
child: OTPWidget(
@ -97,7 +99,7 @@ class _OtpDialogState extends State<OtpDialog> {
child: Row(
children: [
Expanded(
child: Text("Time will expire in"),
child: Text(LocaleKeys.time_will_expire.tr()),
),
CountDownTimer(
secondsRemaining: 60,
@ -127,7 +129,7 @@ class _OtpDialogState extends State<OtpDialog> {
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Text(
"Resend Code",
LocaleKeys.resend_code.tr(),
style: TextStyle(
decoration: TextDecoration.underline,
fontWeight: FontWeight.bold,
@ -139,7 +141,7 @@ class _OtpDialogState extends State<OtpDialog> {
),
40.height,
ShowFillButton(
title: "Check Code",
title: LocaleKeys.check_code.tr(),
width: double.infinity,
onPressed: () {
widget.onClick(code);

@ -8,15 +8,18 @@ class DropValue {
String value;
String subValue;
DropValue(this.id, this.value,this.subValue);
DropValue(this.id, this.value, this.subValue);
bool operator ==(o) => o is DropValue && o.value == value && o.id == id;
}
class DropdownField extends StatefulWidget {
String? hint;
List<DropValue>? list;
DropValue? dropdownValue;
Function(DropValue) onSelect;
DropdownField(this.onSelect, {this.hint, this.list});
DropdownField(this.onSelect, {this.hint, this.list, this.dropdownValue});
@override
State<DropdownField> createState() => _DropdownFieldState();
@ -25,10 +28,16 @@ class DropdownField extends StatefulWidget {
class _DropdownFieldState extends State<DropdownField> {
DropValue? dropdownValue;
List<DropValue> defaultV = [
new DropValue(1, "One",""),
new DropValue(2, "Two",""),
new DropValue(1, "One", ""),
new DropValue(2, "Two", ""),
];
@override
void initState() {
super.initState();
dropdownValue = widget.dropdownValue;
}
@override
Widget build(BuildContext context) {
return Container(

@ -7,7 +7,7 @@ class ShowFillButton extends StatelessWidget {
String title;
VoidCallback onPressed;
Color txtColor;
double elevation, radius, width;
double elevation, radius, width,height, fontSize, horizontalPadding;
ShowFillButton({
required this.title,
@ -16,6 +16,9 @@ class ShowFillButton extends StatelessWidget {
this.elevation = 4,
this.radius = 6,
this.width = 88,
this.height=45,
this.fontSize = 16,
this.horizontalPadding = 16,
});
@override
@ -24,15 +27,15 @@ class ShowFillButton extends StatelessWidget {
style: ElevatedButton.styleFrom(
onPrimary: Colors.black87,
primary: accentColor,
minimumSize: Size(width, 45),
padding: EdgeInsets.symmetric(horizontal: 16),
minimumSize: Size(width, height),
padding: EdgeInsets.symmetric(horizontal: horizontalPadding),
elevation: elevation,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(radius)),
),
),
onPressed: onPressed,
child: title.toUpperCase().toText(fontSize: 16, isBold: true),
child: title.toUpperCase().toText(fontSize: fontSize, isBold: true),
);
}
}

@ -1,5 +1,8 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import '../../generated/locale_keys.g.dart';
enum ClassType { EMAIL, NUMBER }
class LoginEmailTab extends StatefulWidget {
@ -32,7 +35,7 @@ class _LoginEmailTabState extends State<LoginEmailTab> {
color: type == ClassType.NUMBER ? Colors.blue : Colors.transparent,
child: Center(
child: Text(
"Number",
LocaleKeys.number.tr(),
style: TextStyle(
color: type == ClassType.NUMBER ? Colors.white : Colors.black,
fontWeight: FontWeight.bold,
@ -54,7 +57,7 @@ class _LoginEmailTabState extends State<LoginEmailTab> {
color: type == ClassType.EMAIL ? Colors.blue : Colors.transparent,
child: Center(
child: Text(
"Email",
LocaleKeys.email.tr(),
style: TextStyle(
color: type == ClassType.EMAIL ? Colors.white : Colors.black,
fontWeight: FontWeight.bold,

@ -64,7 +64,7 @@ class TxtField extends StatelessWidget {
elevation: elevation,
margin: isSidePaddingZero?EdgeInsets.zero:null,
child: TextField(
keyboardType: TextInputType.number,
keyboardType: keyboardType,
autofocus: false,
controller: controller,
enabled: isNeedClickAll == true ? false : true,

@ -301,6 +301,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta:
dependency: transitive
description:
@ -571,7 +578,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
version: "0.4.8"
typed_data:
dependency: transitive
description:

@ -1,6 +1,6 @@
{
"firstTimeLogIn": "تسجيل الدخول لأول مره",
"signUp": "تسجيل دخول",
"signUp": "التسجيل",
"changeMobile": "تغيير رقم الجوال",
"notifications": "الاشعارات",
"general": "عام",
@ -10,6 +10,7 @@
"retrievePassword" : "استرجاع كلمة المرور",
"changeEmail": "تغيير الايميل",
"verify": "تحقق",
"verified": "تم التحقق",
"signOut": "تسجيل خروج",
"enterEmail": "ادخل الايميل",
"enterNewEmail": "ادخل ايميل جديد",
@ -74,6 +75,7 @@
"defineProviders":"تحديد الموفرين",
"closeAccount": "اغلاق الحساب",
"createBranch" : "انشاء فرع",
"updateBranch" : "فرع التحديث",
"address": "العنوان",
"branchDescription": "وصف الفرع",
"branchName": "اسم الفرع",
@ -92,6 +94,15 @@
"completeProfile2" : "اكمل الملف الشخصي 2/3",
"completeProfile3" : "اكمل الملف الشخصي 3/3",
"userInformation": "معلومات المتسخدم",
"faceRecognition": "تحقق مع بصمة الوجه",
"fingerPrint" : "تحقق مع بصمة الاصبع",
"whatsapp": "تحقق مع Whatsapp",
"SMS": "رسائل قصيره",
"selectRole" : "حدد الدور",
"userRoleOrTitle" : "عنوان المستخدم",
"codeSentToEmail": "تم ارسال الرمز للايميل",
"number": "موبايل",
"english": "English",
"provider": "Provider",
"title": "Hello",
"msg": "Hello {} in the {} world ",
@ -128,5 +139,18 @@
"female": "Hello girl :) {}"
}
},
"reset_locale": "Reset Language"
}
"reset_locale": "Reset Language",
"insert_otp_code" : "الرجاء إدخال رمز OTP",
"resend_code" : "أعد إرسال الرمز",
"check_code" : "التحقق من الشفرة",
"time_will_expire" : "سينتهي الوقت في",
"no_city_available" : "لا توجد مدينة متاحة لهذا البلد",
"branch_created" : "تم إنشاء الفرع بنجاح",
"branch_updated" : "تم تحديث الفرع بنجاح",
"branch_deleted" : "تم حذف الفرع بنجاح",
"dashboard_main" : "لوحة القيادة / الصفحة الرئيسية",
"logo_brand" : "الشعار / العلامة التجارية",
"remove": "إزالة",
"no_branch": "لم يتم إضافة فرع حتى الآن",
"login_once": "الرجاء تسجيل الدخول مرة واحدة"
}

@ -1,6 +1,6 @@
{
"firstTimeLogIn" : "First Time Log In",
"signUp": "Sing Up",
"signUp": "Sign Up",
"changeMobile": "Change Mobile",
"notifications": "Notifications",
"general": "General",
@ -10,6 +10,7 @@
"retrievePassword" : "Retrieve Password",
"changeEmail": "Change Email",
"verify": "Verify",
"verified": "Verified",
"signOut": "Sign Out",
"enterEmail": "Enter Email",
"enterNewEmail": "Enter New Email",
@ -74,11 +75,12 @@
"defineProviders":"Define Providers",
"closeAccount": "Close Account",
"createBranch" : "Create Branch",
"updateBranch" : "Update Branch",
"address": "Address",
"branchDescription": "Branch Description",
"branchName": "Branch Name",
"chooseCity": "Choose City",
"chooseCountry": "Choose Country",
"chooseCity": "Select City",
"chooseCountry": "Select Country",
"selectAttachment":"Select Attachment",
"somethingWrong" : "Something went wrong",
"documentsUploaded" : "Documents uploaded successfully",
@ -93,6 +95,15 @@
"completeProfile3" : "Complete Profile 3/3",
"userInformation": "User Information",
"provider": "Provider",
"faceRecognition": "Face Recognition",
"fingerPrint" : "Finger Print",
"whatsapp": "With Whatsapp",
"SMS": "With SMS",
"selectRole" : "Select Role",
"userRoleOrTitle" : "User role or title",
"codeSentToEmail": "Code is sent to email",
"number": "Number",
"english": "عربي",
"title": "Hello",
"msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language",
@ -128,5 +139,18 @@
"female": "Hello girl :) {}"
}
},
"reset_locale": "Reset Language"
}
"reset_locale": "Reset Language",
"insert_otp_code" : "Please insert OTP Code",
"resend_code" : "Resend Code",
"check_code" : "Check Code",
"time_will_expire" : "Time will Expire in",
"no_city_available" : "No City Available for this country",
"branch_created" : "Branch is successfully created",
"branch_updated" : "Branch is successfully Updated",
"branch_deleted" : "Branch is successfully Deleted",
"dashboard_main" : "Dashboard/Main Page",
"logo_brand" : "Logo/Brand",
"remove": "Remove",
"no_branch": "No Branch Added Yet",
"login_once": "Please login once"
}

Loading…
Cancel
Save