Browse Source

update lang di mobile done

Yulian 2 months ago
parent
commit
a15f3b8327

+ 9 - 9
assets/lang/ar.json

@@ -95,16 +95,16 @@
   "writeMessage": "اكتب رسالة",
   "writeMessage": "اكتب رسالة",
   "yesterday": "أمس",
   "yesterday": "أمس",
   "language": "اللغة",
   "language": "اللغة",
-  "bahasa": "الإندونيسية",
-  "english": "الإنجليزية",
-  "japanese": "اليابانية",
-  "korean": "الكورية",
-  "chinese": "الصينية",
-  "german": "الألمانية",
-  "french": "الفرنسية",
-  "hindi": "الهندية",
+  "bahasa": "Indonesia",
+  "english": "English",
+  "japanese": "日本語",
+  "korean": "한국어",
+  "chinese": "中文",
+  "german": "Deutsch",
+  "french": "Français",
+  "hindi": "हिंदी",
   "arabic": "العربية",
   "arabic": "العربية",
-  "dutch": "الهولندية",
+  "dutch": "Nederlands",
   "chooseLanguage": "اختر اللغة",
   "chooseLanguage": "اختر اللغة",
   "rate": "التقييم",
   "rate": "التقييم",
   "rated": "تم تقديم التقييم.",
   "rated": "تم تقديم التقييم.",

+ 9 - 9
assets/lang/de.json

@@ -95,16 +95,16 @@
   "writeMessage": "Nachricht schreiben",
   "writeMessage": "Nachricht schreiben",
   "yesterday": "Gestern",
   "yesterday": "Gestern",
   "language": "Sprache",
   "language": "Sprache",
-  "bahasa": "Indonesisch",
-  "english": "Englisch",
-  "japanese": "Japanisch",
-  "korean": "Koreanisch",
-  "chinese": "Chinesisch",
+  "bahasa": "Indonesia",
+  "english": "English",
+  "japanese": "日本語",
+  "korean": "한국어",
+  "chinese": "中文",
   "german": "Deutsch",
   "german": "Deutsch",
-  "french": "Französisch",
-  "hindi": "Hindi",
-  "arabic": "Arabisch",
-  "dutch": "Niederländisch",
+  "french": "Français",
+  "hindi": "हिंदी",
+  "arabic": "العربية",
+  "dutch": "Nederlands",
   "chooseLanguage": "Sprache wählen",
   "chooseLanguage": "Sprache wählen",
   "rate": "Bewertung",
   "rate": "Bewertung",
   "rated": "Bewertung wurde abgegeben.",
   "rated": "Bewertung wurde abgegeben.",

+ 9 - 9
assets/lang/en.json

@@ -95,16 +95,16 @@
    "writeMessage": "Write message",
    "writeMessage": "Write message",
    "yesterday": "Yesterday",
    "yesterday": "Yesterday",
    "language": "Language",
    "language": "Language",
-   "bahasa": "Indonesian",
+   "bahasa": "Indonesia",
    "english": "English",
    "english": "English",
-   "japanese": "Japanese",
-   "korean": "Korean",
-   "chinese": "Chinese",
-   "german": "Germany",
-   "french": "French",
-   "hindi": "India",
-   "arabic": "Arabic",
-   "dutch": "Netherlands",
+   "japanese": "日本語",
+   "korean": "한국어",
+   "chinese": "中文",
+   "german": "Deutsch",
+   "french": "Français",
+   "hindi": "हिंदी",
+   "arabic": "العربية",
+   "dutch": "Nederlands",
    "chooseLanguage": "Select Language",
    "chooseLanguage": "Select Language",
    "rate": "Rate",
    "rate": "Rate",
    "rated": "This mission have been rated.",
    "rated": "This mission have been rated.",

+ 9 - 9
assets/lang/fr.json

@@ -95,16 +95,16 @@
   "writeMessage": "Écrire un message",
   "writeMessage": "Écrire un message",
   "yesterday": "Hier",
   "yesterday": "Hier",
   "language": "Langue",
   "language": "Langue",
-  "bahasa": "Indonésien",
-  "english": "Anglais",
-  "japanese": "Japonais",
-  "korean": "Coréen",
-  "chinese": "Chinois",
-  "german": "Allemand",
+  "bahasa": "Indonesia",
+  "english": "English",
+  "japanese": "日本語",
+  "korean": "한국어",
+  "chinese": "中文",
+  "german": "Deutsch",
   "french": "Français",
   "french": "Français",
-  "hindi": "Hindi",
-  "arabic": "Arabe",
-  "dutch": "Néerlandais",
+  "hindi": "हिंदी",
+  "arabic": "العربية",
+  "dutch": "Nederlands",
   "chooseLanguage": "Choisir la langue",
   "chooseLanguage": "Choisir la langue",
   "rate": "Évaluation",
   "rate": "Évaluation",
   "rated": "Évaluation déjà donnée.",
   "rated": "Évaluation déjà donnée.",

+ 9 - 9
assets/lang/hi.json

@@ -95,16 +95,16 @@
   "writeMessage": "संदेश लिखें",
   "writeMessage": "संदेश लिखें",
   "yesterday": "कल",
   "yesterday": "कल",
   "language": "भाषा",
   "language": "भाषा",
-  "bahasa": "इंडोनेशियाई",
-  "english": "अंग्रेज़ी",
-  "japanese": "जापानी",
-  "korean": "कोरियाई",
-  "chinese": "चीनी",
-  "german": "जर्मन",
-  "french": "फ्रेंच",
+  "bahasa": "Indonesia",
+  "english": "English",
+  "japanese": "日本語",
+  "korean": "한국어",
+  "chinese": "中文",
+  "german": "Deutsch",
+  "french": "Français",
   "hindi": "हिंदी",
   "hindi": "हिंदी",
-  "arabic": "अरबी",
-  "dutch": "डच",
+  "arabic": "العربية",
+  "dutch": "Nederlands",
   "chooseLanguage": "भाषा चुनें",
   "chooseLanguage": "भाषा चुनें",
   "rate": "रेटिंग",
   "rate": "रेटिंग",
   "rated": "रेटिंग दी जा चुकी है।",
   "rated": "रेटिंग दी जा चुकी है।",

+ 9 - 9
assets/lang/id.json

@@ -96,15 +96,15 @@
    "yesterday": "Kemarin",
    "yesterday": "Kemarin",
    "language": "Bahasa",
    "language": "Bahasa",
    "bahasa": "Indonesia",
    "bahasa": "Indonesia",
-   "english": "Inggris",
-   "japanese": "Jepang",
-   "korean": "Korea",
-   "chinese": "Cina",
-   "german": "Jerman",
-   "french": "Prancis",
-   "hindi": "India",
-   "arabic": "Arab",
-   "dutch": "Belanda",
+   "english": "English",
+   "japanese": "日本語",
+   "korean": "한국어",
+   "chinese": "中文",
+   "german": "Deutsch",
+   "french": "Français",
+   "hindi": "हिंदी",
+   "arabic": "العربية",
+   "dutch": "Nederlands",
    "chooseLanguage": "Pilih Bahasa",
    "chooseLanguage": "Pilih Bahasa",
    "rate": "Penilaian",
    "rate": "Penilaian",
    "rated": "Penilaian sudah diberikan.",
    "rated": "Penilaian sudah diberikan.",

+ 9 - 9
assets/lang/ja.json

@@ -95,16 +95,16 @@
    "writeMessage": "メッセージを書く",
    "writeMessage": "メッセージを書く",
    "yesterday": "昨日",
    "yesterday": "昨日",
    "language": "言語",
    "language": "言語",
-   "bahasa": "インドネシア語",
-   "english": "英語",
+   "bahasa": "Indonesia",
+   "english": "English",
    "japanese": "日本語",
    "japanese": "日本語",
-   "korean": "韓国語",
-   "chinese": "中国語",
-   "german": "ドイツ語",
-   "french": "フランス語",
-   "hindi": "ヒンディー語",
-   "arabic": "アラビア語",
-   "dutch": "オランダ語",
+   "korean": "한국어",
+   "chinese": "中",
+   "german": "Deutsch",
+   "french": "Français",
+   "hindi": "हिंदी",
+   "arabic": "العربية",
+   "dutch": "Nederlands",
    "chooseLanguage": "言語を選択する",
    "chooseLanguage": "言語を選択する",
    "rate": "レート",
    "rate": "レート",
    "rated": "このミッションは評価されています。",
    "rated": "このミッションは評価されています。",

+ 9 - 9
assets/lang/ko.json

@@ -95,16 +95,16 @@
    "writeMessage": "메시지 쓰기",
    "writeMessage": "메시지 쓰기",
    "yesterday": "어제",
    "yesterday": "어제",
    "language": "언어",
    "language": "언어",
-   "bahasa": "인도네시아어",
-   "english": "영어",
-   "japanese": "일본어",
+   "bahasa": "Indonesia",
+   "english": "English",
+   "japanese": "日本語",
    "korean": "한국어",
    "korean": "한국어",
-   "chinese": "중국어",
-   "german": "독일어",
-   "french": "프랑스어",
-   "hindi": "힌디어",
-   "arabic": "아랍어",
-   "dutch": "네덜란드어",
+   "chinese": "中文",
+   "german": "Deutsch",
+   "french": "Français",
+   "hindi": "हिंदी",
+   "arabic": "العربية",
+   "dutch": "Nederlands",
    "chooseLanguage": "언어 선택",
    "chooseLanguage": "언어 선택",
    "rate": "비율",
    "rate": "비율",
    "rated": "이 임무는 평가되었습니다.",
    "rated": "이 임무는 평가되었습니다.",

+ 9 - 9
assets/lang/nl.json

@@ -95,15 +95,15 @@
   "writeMessage": "Bericht schrijven",
   "writeMessage": "Bericht schrijven",
   "yesterday": "Gisteren",
   "yesterday": "Gisteren",
   "language": "Taal",
   "language": "Taal",
-  "bahasa": "Indonesisch",
-  "english": "Engels",
-  "japanese": "Japans",
-  "korean": "Koreaans",
-  "chinese": "Chinees",
-  "german": "Duits",
-  "french": "Frans",
-  "hindi": "Hindi",
-  "arabic": "Arabisch",
+  "bahasa": "Indonesia",
+  "english": "English",
+  "japanese": "日本語",
+  "korean": "한국어",
+  "chinese": "中文",
+  "german": "Deutsch",
+  "french": "Français",
+  "hindi": "हिंदी",
+  "arabic": "العربية",
   "dutch": "Nederlands",
   "dutch": "Nederlands",
   "chooseLanguage": "Kies taal",
   "chooseLanguage": "Kies taal",
   "rate": "Beoordeling",
   "rate": "Beoordeling",

+ 9 - 9
assets/lang/zh.json

@@ -95,16 +95,16 @@
    "writeMessage": "写信息",
    "writeMessage": "写信息",
    "yesterday": "昨天",
    "yesterday": "昨天",
    "language": "语言",
    "language": "语言",
-   "bahasa": "印尼语",
-   "english": "英语",
-   "japanese": "日",
-   "korean": "韩语",
+   "bahasa": "Indonesia",
+   "english": "English",
+   "japanese": "日本語",
+   "korean": "한국어",
    "chinese": "中文",
    "chinese": "中文",
-   "german": "德语",
-   "french": "法语",
-   "hindi": "印地语",
-   "arabic": "阿拉伯语",
-   "dutch": "荷兰语",
+   "german": "Deutsch",
+   "french": "Français",
+   "hindi": "हिंदी",
+   "arabic": "العربية",
+   "dutch": "Nederlands",
    "chooseLanguage": "选择语言",
    "chooseLanguage": "选择语言",
    "rate": "速度",
    "rate": "速度",
    "rated": "该任务已被评级。",
    "rated": "该任务已被评级。",

+ 2 - 2
lib/main.dart

@@ -257,10 +257,10 @@ class NotificationClass {
     return activeNotif;
     return activeNotif;
   }
   }
 
 
-  startNotification(BuildContext context) async {
+  startNotification(BuildContext context, {code}) async {
     var token = await U.getFcmToken();
     var token = await U.getFcmToken();
     if (token != null) {
     if (token != null) {
-      Map data = {'token': token, 'language': context.locale.toString().toUpperCase()};
+      Map data = {'token': token, 'language': code ?? context.locale.toString().toUpperCase()};
       var res = _apiAuthProvider.postData('/api/fcmTokens/register', null, data, context);
       var res = _apiAuthProvider.postData('/api/fcmTokens/register', null, data, context);
       return res;
       return res;
     }
     }

+ 6 - 1
lib/src/api/jwt_token.dart

@@ -98,7 +98,12 @@ class JwtToken{
       }
       }
 
 
       if(user != null){
       if(user != null){
-        context.setLocale(Locale(user['language'].toLowerCase()));
+        if(U.newServerVersion(1754624839)){
+          var code = U.getLang(user['language']).toLowerCase();
+          context.setLocale(Locale(code));
+        } else {
+          context.setLocale(Locale(user['language'].toLowerCase()));
+        }
       }
       }
 
 
       if(U.getInternetStatus()){
       if(U.getInternetStatus()){

+ 19 - 3
lib/src/layouts/auth/login.dart

@@ -59,8 +59,7 @@ class _LoginPageState extends State<LoginPage> {
         companyName = lics['companyName']??'';
         companyName = lics['companyName']??'';
         serialNumber = lics['serialNumber']??'';
         serialNumber = lics['serialNumber']??'';
         companyLogo = lics['logo']??'';
         companyLogo = lics['logo']??'';
-        var sv = lics['serverVersion'];
-        if(1754624839 <= sv){
+        if(U.newServerVersion(1754624839)){
           lang = lics['_validLang'] ?? [];
           lang = lics['_validLang'] ?? [];
         } else if(1698720817 <= lics['serverVersion']){
         } else if(1698720817 <= lics['serverVersion']){
           lang = lics['languages'] != null ? lics['languages'].split(',') : [];
           lang = lics['languages'] != null ? lics['languages'].split(',') : [];
@@ -303,8 +302,25 @@ class _LoginPageState extends State<LoginPage> {
 
 
   switchLang(BuildContext context, code, tkn) async {
   switchLang(BuildContext context, code, tkn) async {
     // print("switchLang called");
     // print("switchLang called");
+    var lg = code.toUpperCase();
+    if(lang.indexOf(code) > 1){
+      lg = lang.indexOf(code) - 1;
+    }
+    var p;
+    if(U.newServerVersion(1754624839)){
+      p = {
+        'userId': tkn['user_name'].toString().replaceFirst('inf-', ""),
+        'language': 'ID',
+        '_language': lg
+      };
+    } else {
+      p = {
+        'userId': tkn['user_name'].toString().replaceFirst('inf-', ""),
+        'language': lg
+      };
+    }
     try{
     try{
-      var res = await apiAuthProvider.patchData('/api/informants/' + tkn['userId'].toString(), {'userId': tkn['user_name'].toString().replaceFirst('inf-', ""), 'language': code.toUpperCase()}, context);
+      var res = await apiAuthProvider.patchData('/api/informants/' + tkn['userId'].toString(), p, context);
       if (res != null) {
       if (res != null) {
         // print("res $res");
         // print("res $res");
         // context.setLocale(Locale(code));
         // context.setLocale(Locale(code));

+ 2 - 3
lib/src/layouts/auth/qr.dart

@@ -61,9 +61,8 @@ class _NewQrPageState extends State<NewQrPage> {
         setState(() {
         setState(() {
           companyName = lics['companyName']??'';
           companyName = lics['companyName']??'';
           serialNumber = lics['serialNumber']??'';
           serialNumber = lics['serialNumber']??'';
-          sv = lics['serverVersion'];
-          if(1754624839 <= sv){
-            lang = lics['_validlang'] ?? [];
+          if(U.newServerVersion(1754624839)){
+            lang = lics['_validLang'] ?? [];
           } else if(1698720817 <= lics['serverVersion']){
           } else if(1698720817 <= lics['serverVersion']){
             lang = lics['languages'] != null ? lics['languages'].split(',') : [];
             lang = lics['languages'] != null ? lics['languages'].split(',') : [];
           }
           }

+ 5 - 5
lib/src/layouts/components/template.dart

@@ -1,7 +1,7 @@
 import 'dart:async';
 import 'dart:async';
 import 'dart:convert';
 import 'dart:convert';
 import 'dart:io';
 import 'dart:io';
-import 'dart:ui';
+import 'dart:ui' as ui;
 
 
 import 'package:another_flushbar/flushbar.dart';
 import 'package:another_flushbar/flushbar.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:auto_route/auto_route.dart';
@@ -83,7 +83,7 @@ Widget textHorizontal(String title, String subtitle, {double size = 14, double o
         child: copy?Row(
         child: copy?Row(
           mainAxisAlignment: MainAxisAlignment.end,
           mainAxisAlignment: MainAxisAlignment.end,
           children: [
           children: [
-            Expanded(child: Text(subtitle, style: TextStyle(color: textColor, fontSize: size), maxLines: 3, overflow: TextOverflow.ellipsis, textAlign: TextAlign.right)),
+            Expanded(child: Text(subtitle, style: TextStyle(color: textColor, fontSize: size), maxLines: 3, overflow: TextOverflow.ellipsis, textAlign: TextAlign.end)),
             SizedBox(width: 5),
             SizedBox(width: 5),
             InkWell(
             InkWell(
               child: Icon(Icons.copy, color: textColor, size: size+2),
               child: Icon(Icons.copy, color: textColor, size: size+2),
@@ -93,7 +93,7 @@ Widget textHorizontal(String title, String subtitle, {double size = 14, double o
               },
               },
             ),
             ),
           ],
           ],
-        ):Text(subtitle, style: TextStyle(color: textColor, fontSize: size), maxLines: 3, overflow: TextOverflow.ellipsis, textAlign: TextAlign.right),
+        ):Text("$subtitle", style: TextStyle(color: textColor, fontSize: size), maxLines: 3, overflow: TextOverflow.ellipsis, textAlign: TextAlign.end,),
       ),
       ),
     ],
     ],
   );
   );
@@ -167,7 +167,7 @@ Widget shimmerTopMenu(BuildContext context){
 Widget requestTiles({required String image, required String title, required String subtitle, bool border = false, double vertical = 16}){
 Widget requestTiles({required String image, required String title, required String subtitle, bool border = false, double vertical = 16}){
   return Container(
   return Container(
     margin: EdgeInsets.symmetric(vertical: vertical),
     margin: EdgeInsets.symmetric(vertical: vertical),
-    padding: EdgeInsets.only(right: border?16:0),
+    padding: EdgeInsetsDirectional.only(end: border?16:0),
     child: Row(
     child: Row(
       children: [
       children: [
         imageTiles(imageUrl: image),
         imageTiles(imageUrl: image),
@@ -751,7 +751,7 @@ class NoImageFound extends StatelessWidget {
           ClipRRect(
           ClipRRect(
             // Clip it cleanly.
             // Clip it cleanly.
             child: BackdropFilter(
             child: BackdropFilter(
-              filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
+              filter: ui.ImageFilter.blur(sigmaX: 10, sigmaY: 10),
               child: Container(
               child: Container(
                 color: Colors.grey.withValues(alpha: 0.5),
                 color: Colors.grey.withValues(alpha: 0.5),
                 alignment: Alignment.center,
                 alignment: Alignment.center,

+ 17 - 4
lib/src/layouts/functions/account.dart

@@ -28,13 +28,26 @@ class AccountFunction{
 
 
   switchLang(BuildContext context, code, user) async {
   switchLang(BuildContext context, code, user) async {
     showLoading(context);
     showLoading(context);
+    var locale = 'id';
+    if(code is int){
+      var vl = U.retValidLang();
+      locale = vl[code+1];
+      code = code.toString();
+    } else {
+      locale = code;
+    }
     try{
     try{
-      var res = await apiAuthProvider.patchData('/api/informants/' + user['id'].toString(), {'userId': user['userId'], 'language': code.toUpperCase()}, context);
-      print(res);
+      var p;
+      if(U.newServerVersion(1754624839)){
+        p = {'userId': user['userId'], 'language': 'ID', '_language': code.toUpperCase()};
+      } else {
+        p = {'userId': user['userId'], 'language': code.toUpperCase()};
+      }
+      var res = await apiAuthProvider.patchData('/api/informants/' + user['id'].toString(), p, context);
       if (res != null) {
       if (res != null) {
         closeLoading(context);
         closeLoading(context);
-        context.setLocale(Locale(code));
-        notification.startNotification(context);
+        context.setLocale(Locale(locale));
+        notification.startNotification(context, code: code);
         Navigator.of(context).pop();
         Navigator.of(context).pop();
       } else {
       } else {
         closeLoading(context);
         closeLoading(context);

+ 7 - 1
lib/src/layouts/mobile/app_mobile.dart

@@ -67,7 +67,13 @@ class _MobAppPageState extends State<MobAppPage>with TickerProviderStateMixin {
       if(connected){
       if(connected){
         setState(()=>isConnected = true);
         setState(()=>isConnected = true);
         notification.initFirebaseMessaging(context);
         notification.initFirebaseMessaging(context);
-        notification.startNotification(context);
+        var valLang = U.retValidLang();
+        var langCode = context.locale.toString();
+        var code;
+        if(valLang.indexOf(langCode) > 1){
+          code = valLang.indexOf(langCode) - 1;
+        }
+        notification.startNotification(context, code: code);
 
 
         if(U.newServerVersion(1709864293)){
         if(U.newServerVersion(1709864293)){
           U.checkPendingRequest(context);
           U.checkPendingRequest(context);

+ 6 - 6
lib/src/layouts/mobile/history_detail.dart

@@ -62,6 +62,11 @@ class _MobHistoryDetailPageState extends State<MobHistoryDetailPage> {
               child: Container(
               child: Container(
                 margin: EdgeInsets.only(right: 16),
                 margin: EdgeInsets.only(right: 16),
                 padding: EdgeInsets.fromLTRB(16, 9, 16, 9),
                 padding: EdgeInsets.fromLTRB(16, 9, 16, 9),
+                decoration: BoxDecoration(
+                    color: primaryColor.withValues(alpha: 0.1),
+                    border: Border.all(color: primaryColor),
+                    borderRadius: BorderRadius.all(Radius.circular(50))
+                ),
                 child: Row(
                 child: Row(
                   children: [
                   children: [
                     Text('forum'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
                     Text('forum'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
@@ -69,11 +74,6 @@ class _MobHistoryDetailPageState extends State<MobHistoryDetailPage> {
                     U.iconsax('messages-3', color: primaryColor, size: 20)
                     U.iconsax('messages-3', color: primaryColor, size: 20)
                   ],
                   ],
                 ),
                 ),
-                decoration: BoxDecoration(
-                    color: primaryColor.withValues(alpha: 0.1),
-                    border: Border.all(color: primaryColor),
-                    borderRadius: BorderRadius.all(Radius.circular(50))
-                ),
               ),
               ),
               onTap: (){
               onTap: (){
                 Provider.of<HistoryModule>(context, listen: false).setForumFalse(widget.index);
                 Provider.of<HistoryModule>(context, listen: false).setForumFalse(widget.index);
@@ -98,7 +98,7 @@ class _MobHistoryDetailPageState extends State<MobHistoryDetailPage> {
                         child: Column(
                         child: Column(
                           crossAxisAlignment: CrossAxisAlignment.start,
                           crossAxisAlignment: CrossAxisAlignment.start,
                           children: [
                           children: [
-                            Text(list[U.langColumn(context, 'requestGroupDescription')], style: TextStyle(color: textColor, fontWeight: FontWeight.w600)),
+                            Text(list[U.langColumn(context, 'requestGroupDescription')]??'', style: TextStyle(color: textColor, fontWeight: FontWeight.w600)),
                             requestTiles(
                             requestTiles(
                                 image: list['_requestImage'] ?? "null",
                                 image: list['_requestImage'] ?? "null",
                                 title: list[U.langColumn(context, 'requestSubject')],
                                 title: list[U.langColumn(context, 'requestSubject')],

+ 31 - 27
lib/src/layouts/mobile/menu_account.dart

@@ -29,6 +29,8 @@ class _MobAccountPageState extends State<MobAccountPage> {
   bool autoTranslate = false;
   bool autoTranslate = false;
   List lang = [];
   List lang = [];
   bool _timeLimit = false;
   bool _timeLimit = false;
+  int sv = 0;
+  var codeOflang = {};
 
 
   @override
   @override
   void initState() {
   void initState() {
@@ -58,19 +60,27 @@ class _MobAccountPageState extends State<MobAccountPage> {
       dnd = Provider.of<UserModule>(context, listen: false).dndStatus();
       dnd = Provider.of<UserModule>(context, listen: false).dndStatus();
       serDis = U.servantDisplay();
       serDis = U.servantDisplay();
       autoTranslate = U.autoTranslate();
       autoTranslate = U.autoTranslate();
-      lang = license['languages'] != null ? license['languages'].split(',') : [];
+      if(U.newServerVersion(1754624839)){
+        lang = license['_validLang'] ?? [];
+      } else {
+        lang = license['languages'] != null ? license['languages'].split(',') : [];
+      }
     });
     });
   }
   }
 
 
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
-    var codeOflang = {
+    codeOflang = {
       "id": 'bahasa'.tr(),
       "id": 'bahasa'.tr(),
       "en": 'english'.tr(),
       "en": 'english'.tr(),
       "ja": 'japanese'.tr(),
       "ja": 'japanese'.tr(),
       "zh": 'chinese'.tr(),
       "zh": 'chinese'.tr(),
       "ko": 'korean'.tr(),
       "ko": 'korean'.tr(),
-      "ar": 'العربية'
+      "ar": 'arabic'.tr(),
+      "de": 'german'.tr(),
+      "fr": 'french'.tr(),
+      "hi": 'hindi'.tr(),
+      "nl": 'dutch'.tr()
     };
     };
     return Provider.of<UserModule>(context).user().isNotEmpty ? Scaffold(
     return Provider.of<UserModule>(context).user().isNotEmpty ? Scaffold(
       backgroundColor: backgroundColor,
       backgroundColor: backgroundColor,
@@ -114,9 +124,9 @@ class _MobAccountPageState extends State<MobAccountPage> {
                         children: [
                         children: [
                           Text('info_label'.tr(), style: TextStyle(color: textColor, fontSize: 16, fontWeight: FontWeight.w500)),
                           Text('info_label'.tr(), style: TextStyle(color: textColor, fontSize: 16, fontWeight: FontWeight.w500)),
                           SizedBox(height: 20),
                           SizedBox(height: 20),
-                          textHorizontal('userId'.tr(), Provider.of<UserModule>(context).user()['relatedTo'] != null ? Provider.of<UserModule>(context).user()['relatedTo'] : Provider.of<UserModule>(context).user()['userId'], size: 16, opacity: 0.75),
+                          textHorizontal('userId'.tr(), Provider.of<UserModule>(context).user()['relatedTo'] ?? Provider.of<UserModule>(context).user()['userId'], size: 16, opacity: 0.75),
                           SizedBox(height: 12),
                           SizedBox(height: 12),
-                          textHorizontal('location'.tr(), Provider.of<UserModule>(context).user()['location'] != null ? Provider.of<UserModule>(context).user()['location'] : '-', size: 16, opacity: 0.75),
+                          textHorizontal('location'.tr(), Provider.of<UserModule>(context).user()['location'] ?? '-', size: 16, opacity: 0.75),
                           SizedBox(height: 12),
                           SizedBox(height: 12),
                           textHorizontal('servantGroup'.tr(), Provider.of<UserModule>(context).user()['requestTypeListDescriptionMobile'] != null ? Provider.of<UserModule>(context).user()['requestTypeListDescriptionMobile'].toLowerCase() == 'semua' ? 'all'.tr() : Provider.of<UserModule>(context).user()['requestTypeListDescriptionMobile'] : '-', size: 16, opacity: 0.75),
                           textHorizontal('servantGroup'.tr(), Provider.of<UserModule>(context).user()['requestTypeListDescriptionMobile'] != null ? Provider.of<UserModule>(context).user()['requestTypeListDescriptionMobile'].toLowerCase() == 'semua' ? 'all'.tr() : Provider.of<UserModule>(context).user()['requestTypeListDescriptionMobile'] : '-', size: 16, opacity: 0.75),
                         ],
                         ],
@@ -465,34 +475,28 @@ class _MobAccountPageState extends State<MobAccountPage> {
               accFunc.switchLang(context, 'en', user);
               accFunc.switchLang(context, 'en', user);
             } : null,
             } : null,
           ),
           ),
-          lang.contains('ja') ? ListTile(
-            title: Text('japanese'.tr(), style: TextStyle(color: textColor, fontSize: 14)),
-            trailing: Icon(context.locale.toString()=='ja'?Icons.radio_button_checked:Icons.radio_button_off, color: primaryColor, size: 18),
-            onTap: context.locale.toString() != 'ja' ? () async {
-              accFunc.switchLang(context, 'ja', user);
+          //TODO: kene
+          lang.length - 1 > 1 ? ListTile(
+            title: Text(codeOflang[lang[2]], style: TextStyle(color: textColor, fontSize: 14)),
+            trailing: Icon(context.locale.toString()==lang[2]?Icons.radio_button_checked:Icons.radio_button_off, color: primaryColor, size: 18),
+            onTap: context.locale.toString() != lang[2] ? () async {
+              accFunc.switchLang(context, 1, user);
             } : null,
             } : null,
           ) : Container(),
           ) : Container(),
-          lang.contains('zh') ? ListTile(
-            title: Text('chinese'.tr(), style: TextStyle(color: textColor, fontSize: 14)),
-            trailing: Icon(context.locale.toString()=='zh'?Icons.radio_button_checked:Icons.radio_button_off, color: primaryColor, size: 18),
-            onTap: context.locale.toString() != 'zh' ? () async {
-              accFunc.switchLang(context, 'zh', user);
+          lang.length - 1 > 2 ? ListTile(
+            title: Text(codeOflang[lang[3]], style: TextStyle(color: textColor, fontSize: 14)),
+            trailing: Icon(context.locale.toString()==lang[3]?Icons.radio_button_checked:Icons.radio_button_off, color: primaryColor, size: 18),
+            onTap: context.locale.toString() != lang[3] ? () async {
+              accFunc.switchLang(context, 2, user);
             } : null,
             } : null,
           ) : Container(),
           ) : Container(),
-          lang.contains('ko') ? ListTile(
-            title: Text('korean'.tr(), style: TextStyle(color: textColor, fontSize: 14)),
-            trailing: Icon(context.locale.toString()=='ko'?Icons.radio_button_checked:Icons.radio_button_off, color: primaryColor, size: 18),
-            onTap: context.locale.toString() != 'ko' ? () async {
-              accFunc.switchLang(context, 'ko', user);
+          lang.length - 1 > 3 ? ListTile(
+            title: Text(codeOflang[lang[4]], style: TextStyle(color: textColor, fontSize: 14)),
+            trailing: Icon(context.locale.toString()==lang[4]?Icons.radio_button_checked:Icons.radio_button_off, color: primaryColor, size: 18),
+            onTap: context.locale.toString() != lang[4] ? () async {
+              accFunc.switchLang(context, 3, user);
             } : null,
             } : null,
           ) : Container(),
           ) : Container(),
-          lang.contains('ar') ? ListTile(
-            title: Text('العربية', style: TextStyle(color: textColor, fontSize: 14)),
-            trailing: Icon(context.locale.toString()=='ar'?Icons.radio_button_checked:Icons.radio_button_off, color: primaryColor, size: 18),
-            onTap: context.locale.toString() != 'ar' ? () async {
-              accFunc.switchLang(context, 'ar', user);
-            } : null,
-          ) : Container()
         ],
         ],
       ),
       ),
     );
     );

+ 4 - 4
lib/src/layouts/mobile/menu_history.dart

@@ -260,6 +260,7 @@ class _MobHistoryPageState extends State<MobHistoryPage> with TickerProviderStat
               return GestureDetector(
               return GestureDetector(
                 child: Container(
                 child: Container(
                   padding: EdgeInsets.all(16),
                   padding: EdgeInsets.all(16),
+                  decoration: BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: Color(0xffF3F3F3), width: 8))),
                   child: Column(
                   child: Column(
                     children: [
                     children: [
                       Row(
                       Row(
@@ -270,12 +271,12 @@ class _MobHistoryPageState extends State<MobHistoryPage> with TickerProviderStat
                             child: Column(
                             child: Column(
                               crossAxisAlignment: CrossAxisAlignment.start,
                               crossAxisAlignment: CrossAxisAlignment.start,
                               children: [
                               children: [
-                                Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, 'requestGroupDescription')], style: TextStyle(color: textColor, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis),
+                                Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, 'requestGroupDescription')]??'', style: TextStyle(color: textColor, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis),
                                 SizedBox(height: 6),
                                 SizedBox(height: 6),
-                                Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, 'requestSubject')], style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
+                                Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, 'requestSubject')]??'', style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
                                 SizedBox(height: 6),
                                 SizedBox(height: 6),
                                 renderRequested(Provider.of<HistoryModule>(context).dataMisi()[i]),
                                 renderRequested(Provider.of<HistoryModule>(context).dataMisi()[i]),
-                                Text(convertDate(Provider.of<HistoryModule>(context).dataMisi()[i]['datetimeRequest'], context.locale.toString()), style: TextStyle(color: textColor, fontSize: 13, fontWeight: FontWeight.w300)),
+                                Text(convertDate(Provider.of<HistoryModule>(context).dataMisi()[i]['datetimeRequest']??'', context.locale.toString()), style: TextStyle(color: textColor, fontSize: 13, fontWeight: FontWeight.w300)),
                               ],
                               ],
                             ),
                             ),
                           )
                           )
@@ -332,7 +333,6 @@ class _MobHistoryPageState extends State<MobHistoryPage> with TickerProviderStat
                           : Container(),
                           : Container(),
                     ],
                     ],
                   ),
                   ),
-                  decoration: BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: Color(0xffF3F3F3), width: 8))),
                 ),
                 ),
                 onTap: () => navigateTo(context, MobHistoryDetailPage(index: i)).then((val) {
                 onTap: () => navigateTo(context, MobHistoryDetailPage(index: i)).then((val) {
                   val = val??false;
                   val = val??false;

+ 42 - 42
lib/src/layouts/mobile/menu_home.dart

@@ -35,6 +35,7 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
   final HomeFunction homeFunc = HomeFunction();
   final HomeFunction homeFunc = HomeFunction();
   final SharedPreferencesManager sharedPreferencesManager = locator<SharedPreferencesManager>();
   final SharedPreferencesManager sharedPreferencesManager = locator<SharedPreferencesManager>();
   bool _timeLimit = false;
   bool _timeLimit = false;
+  String _localeIndex = 'id';
 
 
   @override
   @override
   void initState() {
   void initState() {
@@ -65,15 +66,9 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
 
 
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
+    _localeIndex = U.newServerVersion(1754624839) ? U.getLangIndex(context.locale.toString()) : context.locale.toString();
     return Provider.of<UserModule>(context).user().isNotEmpty?Scaffold(
     return Provider.of<UserModule>(context).user().isNotEmpty?Scaffold(
       backgroundColor: backgroundColor,
       backgroundColor: backgroundColor,
-      // appBar: PreferredSize(
-      //     preferredSize: Size.fromHeight(0),
-      //     child: AppBar(
-      //       elevation: 0,
-      //       backgroundColor: primaryColor,
-      //     )
-      // ),
       body: Column(
       body: Column(
         children: [
         children: [
           Container(
           Container(
@@ -310,7 +305,12 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                         child: Column(
                         child: Column(
                           crossAxisAlignment: CrossAxisAlignment.start,
                           crossAxisAlignment: CrossAxisAlignment.start,
                           children: [
                           children: [
-                            Padding(padding: EdgeInsets.only(left: 16), child: Text(Provider.of<UserModule>(context).profile()['specialOffer']['label'][context.locale.toString()]??'Not Set', style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500))),
+                            Padding(
+                              padding: EdgeInsetsDirectional.only(start: 16),
+                              child: Text(
+                                Provider.of<UserModule>(context).profile()['specialOffer']['label'][_localeIndex]??'Not Set',
+                                style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500),
+                              )),
                             SizedBox(height: 12),
                             SizedBox(height: 12),
                             Provider.of<ServiceModule>(context).specialOffer().length > 0 ? SingleChildScrollView(
                             Provider.of<ServiceModule>(context).specialOffer().length > 0 ? SingleChildScrollView(
                               scrollDirection: Axis.horizontal,
                               scrollDirection: Axis.horizontal,
@@ -320,6 +320,11 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                     width: U.bodyWidth(context) - 60,
                                     width: U.bodyWidth(context) - 60,
                                     margin: EdgeInsets.only(left: i==0?16:0, right: 16),
                                     margin: EdgeInsets.only(left: i==0?16:0, right: 16),
                                     padding: EdgeInsets.only(right: 16),
                                     padding: EdgeInsets.only(right: 16),
+                                    decoration: BoxDecoration(
+                                        color: Colors.white,
+                                        border: Border.all(color: textColor.withValues(alpha: 0.15)),
+                                        borderRadius: BorderRadius.all(Radius.circular(12))
+                                    ),
                                     child: Row(
                                     child: Row(
                                       children: [
                                       children: [
                                         imageTiles(imageUrl: Provider.of<ServiceModule>(context).specialOffer()[i]['_mobileImage'] ?? "null"),
                                         imageTiles(imageUrl: Provider.of<ServiceModule>(context).specialOffer()[i]['_mobileImage'] ?? "null"),
@@ -336,11 +341,6 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                         )
                                         )
                                       ],
                                       ],
                                     ),
                                     ),
-                                    decoration: BoxDecoration(
-                                        color: Colors.white,
-                                        border: Border.all(color: textColor.withValues(alpha: 0.15)),
-                                        borderRadius: BorderRadius.all(Radius.circular(12))
-                                    ),
                                   ),
                                   ),
                                   onTap: ()=>navigateTo(context, MobReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).specialOffer()[i])),
                                   onTap: ()=>navigateTo(context, MobReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).specialOffer()[i])),
                                 )),
                                 )),
@@ -355,7 +355,7 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                         child: Column(
                         child: Column(
                           crossAxisAlignment: CrossAxisAlignment.start,
                           crossAxisAlignment: CrossAxisAlignment.start,
                           children: [
                           children: [
-                            Padding(padding: EdgeInsets.only(left: 16), child: Text(Provider.of<UserModule>(context).profile()['frequentlyRequested']['label'][context.locale.toString()]??'Not Set', style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500))),
+                            Padding(padding: EdgeInsetsDirectional.only(start: 16), child: Text(Provider.of<UserModule>(context).profile()['frequentlyRequested']['label'][_localeIndex]??'Not Set', style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500))),
                             SizedBox(height: 12),
                             SizedBox(height: 12),
                             Provider.of<ServiceModule>(context).data().length > 0 ? SingleChildScrollView(
                             Provider.of<ServiceModule>(context).data().length > 0 ? SingleChildScrollView(
                               scrollDirection: Axis.horizontal,
                               scrollDirection: Axis.horizontal,
@@ -366,6 +366,11 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                     child: Container(
                                     child: Container(
                                       margin: EdgeInsets.only(left: i==0?16:0, right: 16),
                                       margin: EdgeInsets.only(left: i==0?16:0, right: 16),
                                       width: U.bodyWidth(context)/(kIsWeb?3.8:2.6), height: U.bodyWidth(context)/(kIsWeb?3:2),
                                       width: U.bodyWidth(context)/(kIsWeb?3.8:2.6), height: U.bodyWidth(context)/(kIsWeb?3:2),
+                                      decoration: BoxDecoration(
+                                          color: Colors.white,
+                                          border: Border.all(color: textColor.withValues(alpha: 0.15)),
+                                          borderRadius: BorderRadius.all(Radius.circular(12))
+                                      ),
                                       child: Column(
                                       child: Column(
                                         crossAxisAlignment: CrossAxisAlignment.start,
                                         crossAxisAlignment: CrossAxisAlignment.start,
                                         children: [
                                         children: [
@@ -388,7 +393,7 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                             child: Column(
                                             child: Column(
                                               crossAxisAlignment: CrossAxisAlignment.start,
                                               crossAxisAlignment: CrossAxisAlignment.start,
                                               children: [
                                               children: [
-                                                Text(Provider.of<ServiceModule>(context).data()[i][U.langColumn(context, 'subject')], style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
+                                                Text(Provider.of<ServiceModule>(context).data()[i][U.langColumn(context, 'subject')]??'', style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
                                                 SizedBox(height: 5),
                                                 SizedBox(height: 5),
                                                 Text(Provider.of<ServiceModule>(context).data()[i]['_frequentlyCount'].toString() + 'times'.tr(), style: TextStyle(color: textColor, fontSize: 14, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis)
                                                 Text(Provider.of<ServiceModule>(context).data()[i]['_frequentlyCount'].toString() + 'times'.tr(), style: TextStyle(color: textColor, fontSize: 14, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis)
                                               ],
                                               ],
@@ -396,11 +401,6 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                           )
                                           )
                                         ],
                                         ],
                                       ),
                                       ),
-                                      decoration: BoxDecoration(
-                                          color: Colors.white,
-                                          border: Border.all(color: textColor.withValues(alpha: 0.15)),
-                                          borderRadius: BorderRadius.all(Radius.circular(12))
-                                      ),
                                     ),
                                     ),
                                     onTap: ()=>navigateTo(context, MobReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).data()[i])).then((val){
                                     onTap: ()=>navigateTo(context, MobReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).data()[i])).then((val){
                                       val = val??true;
                                       val = val??true;
@@ -419,7 +419,7 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                         child: Column(
                         child: Column(
                           crossAxisAlignment: CrossAxisAlignment.start,
                           crossAxisAlignment: CrossAxisAlignment.start,
                           children: [
                           children: [
-                            Text(Provider.of<UserModule>(context).profile()['banner']['label'][context.locale.toString()]??'Not Set', style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500)),
+                            Text(Provider.of<UserModule>(context).profile()['banner']['label'][_localeIndex]??'Not Set', style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500)),
                             SizedBox(height: 12),
                             SizedBox(height: 12),
                             Provider.of<ServiceModule>(context).banner().isNotEmpty ? CarouselSlider.builder(
                             Provider.of<ServiceModule>(context).banner().isNotEmpty ? CarouselSlider.builder(
                               itemCount: Provider.of<ServiceModule>(context).banner().length,
                               itemCount: Provider.of<ServiceModule>(context).banner().length,
@@ -438,6 +438,11 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                               itemBuilder: (BuildContext context, int i, int pageViewIndex) => GestureDetector(
                               itemBuilder: (BuildContext context, int i, int pageViewIndex) => GestureDetector(
                                 child: Container(
                                 child: Container(
                                   width: double.infinity,
                                   width: double.infinity,
+                                  decoration: BoxDecoration(
+                                      color: Colors.white,
+                                      border: Border.all(color: textColor.withValues(alpha: 0.15)),
+                                      borderRadius: BorderRadius.all(Radius.circular(12))
+                                  ),
                                   child: Column(
                                   child: Column(
                                     crossAxisAlignment: CrossAxisAlignment.start,
                                     crossAxisAlignment: CrossAxisAlignment.start,
                                     children: [
                                     children: [
@@ -493,11 +498,6 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                       )
                                       )
                                     ],
                                     ],
                                   ),
                                   ),
-                                  decoration: BoxDecoration(
-                                      color: Colors.white,
-                                      border: Border.all(color: textColor.withValues(alpha: 0.15)),
-                                      borderRadius: BorderRadius.all(Radius.circular(12))
-                                  ),
                                 ),
                                 ),
                                 onTap: ()=>navigateTo(context, MobBannerDetailPage(user: Provider.of<UserModule>(context, listen: false).user(), data: Provider.of<ServiceModule>(context, listen: false).banner()[i])).then((val){
                                 onTap: ()=>navigateTo(context, MobBannerDetailPage(user: Provider.of<UserModule>(context, listen: false).user(), data: Provider.of<ServiceModule>(context, listen: false).banner()[i])).then((val){
                                   val = val??true;
                                   val = val??true;
@@ -514,14 +514,28 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                         child: Column(
                         child: Column(
                           crossAxisAlignment: CrossAxisAlignment.start,
                           crossAxisAlignment: CrossAxisAlignment.start,
                           children: [
                           children: [
-                            Text(Provider.of<UserModule>(context).profile()['quickAction']['label'][context.locale.toString()]??'Not Set', style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500)),
+                            Text(Provider.of<UserModule>(context).profile()['quickAction']['label'][_localeIndex]??'Not Set', style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500)),
                             SizedBox(height: 12),
                             SizedBox(height: 12),
                             Provider.of<ServiceModule>(context).quickAct().length > 0 ? Container(
                             Provider.of<ServiceModule>(context).quickAct().length > 0 ? Container(
+                              decoration: BoxDecoration(
+                                  color: Colors.white,
+                                  border: Border.all(color: textColor.withValues(alpha: 0.15)),
+                                  borderRadius: BorderRadius.all(Radius.circular(12))
+                              ),
                               child: Column(
                               child: Column(
                                 children: List.generate(Provider.of<ServiceModule>(context).quickAct().length, (i){
                                 children: List.generate(Provider.of<ServiceModule>(context).quickAct().length, (i){
                                   return GestureDetector(
                                   return GestureDetector(
                                     child: Container(
                                     child: Container(
                                       padding: EdgeInsets.all(12),
                                       padding: EdgeInsets.all(12),
+                                      decoration: BoxDecoration(
+                                          color: Colors.white,
+                                          borderRadius: BorderRadius.only(
+                                            topLeft: Radius.circular(i==0?12:0),
+                                            topRight: Radius.circular(i==0?12:0),
+                                            bottomLeft: Radius.circular(i==Provider.of<ServiceModule>(context).quickAct().length-1?12:0),
+                                            bottomRight: Radius.circular(i==Provider.of<ServiceModule>(context).quickAct().length-1?12:0),
+                                          )
+                                      ),
                                       child: Row(
                                       child: Row(
                                         children: [
                                         children: [
                                           imageTiles(imageUrl: Provider.of<ServiceModule>(context).quickAct()[i]['_mobileImage'] ?? "null", width: 50, height: 40, radius: 5),
                                           imageTiles(imageUrl: Provider.of<ServiceModule>(context).quickAct()[i]['_mobileImage'] ?? "null", width: 50, height: 40, radius: 5),
@@ -532,25 +546,11 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                           U.iconsax('arrow-right-3', size: 14, color: textColor.withValues(alpha: 0.75)),
                                           U.iconsax('arrow-right-3', size: 14, color: textColor.withValues(alpha: 0.75)),
                                         ],
                                         ],
                                       ),
                                       ),
-                                      decoration: BoxDecoration(
-                                          color: Colors.white,
-                                          borderRadius: BorderRadius.only(
-                                            topLeft: Radius.circular(i==0?12:0),
-                                            topRight: Radius.circular(i==0?12:0),
-                                            bottomLeft: Radius.circular(i==Provider.of<ServiceModule>(context).quickAct().length-1?12:0),
-                                            bottomRight: Radius.circular(i==Provider.of<ServiceModule>(context).quickAct().length-1?12:0),
-                                          )
-                                      ),
                                     ),
                                     ),
                                     onTap: ()=>navigateTo(context, MobReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).quickAct()[i])),
                                     onTap: ()=>navigateTo(context, MobReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).quickAct()[i])),
                                   );
                                   );
                                 }),
                                 }),
                               ),
                               ),
-                              decoration: BoxDecoration(
-                                  color: Colors.white,
-                                  border: Border.all(color: textColor.withValues(alpha: 0.15)),
-                                  borderRadius: BorderRadius.all(Radius.circular(12))
-                              ),
                             ) : emptyWidget(left: 0)
                             ) : emptyWidget(left: 0)
                           ],
                           ],
                         ),
                         ),
@@ -638,11 +638,11 @@ class _MobMenuDisplayPageState extends State<MobMenuDisplayPage> {
             child: Container(
             child: Container(
               padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
               padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
               margin: EdgeInsets.only(right: 15),
               margin: EdgeInsets.only(right: 15),
-              child: Text('customize'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
               decoration: BoxDecoration(
               decoration: BoxDecoration(
                   color: primaryColor.withValues(alpha: 0.1),
                   color: primaryColor.withValues(alpha: 0.1),
                   borderRadius: BorderRadius.all(Radius.circular(50))
                   borderRadius: BorderRadius.all(Radius.circular(50))
               ),
               ),
+              child: Text('customize'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
             ),
             ),
             onTap: (){
             onTap: (){
               navigateTo(context, MobMenuEditorPage(scope: widget.scope));
               navigateTo(context, MobMenuEditorPage(scope: widget.scope));

+ 2 - 2
lib/src/layouts/mobile/request_select.dart

@@ -109,8 +109,8 @@ class _MobReqSelectPageState extends State<MobReqSelectPage> {
                     return GestureDetector(
                     return GestureDetector(
                       child: requestTiles(
                       child: requestTiles(
                         image: Provider.of<RequestModule>(context).data()[i]['_mobileImage'] ?? "null",
                         image: Provider.of<RequestModule>(context).data()[i]['_mobileImage'] ?? "null",
-                        title: Provider.of<RequestModule>(context).data()[i][U.langColumn(context, 'subject')],
-                        subtitle: Provider.of<RequestModule>(context).data()[i][U.langColumn(context, 'subjectDescription')],
+                        title: Provider.of<RequestModule>(context).data()[i][U.langColumn(context, 'subject')] ?? '-',
+                        subtitle: Provider.of<RequestModule>(context).data()[i][U.langColumn(context, 'subjectDescription')]??'-',
                       ),
                       ),
                       onTap: ()=>navigateTo(context, MobReqCreatePage(user: widget.user, request: Provider.of<RequestModule>(context, listen: false).data()[i], fromSearch: true)),
                       onTap: ()=>navigateTo(context, MobReqCreatePage(user: widget.user, request: Provider.of<RequestModule>(context, listen: false).data()[i], fromSearch: true)),
                     );
                     );

+ 25 - 1
lib/src/utils/U.dart

@@ -305,11 +305,13 @@ class U {
   }
   }
 
 
   static int _serverVersion = 0;
   static int _serverVersion = 0;
+  static List validLang = [];
   static getServerVersion() async{
   static getServerVersion() async{
     String url = '/api/license';
     String url = '/api/license';
     try {
     try {
       var dt = await ApiAuthProvider().getJsonDataNoAuth(url);
       var dt = await ApiAuthProvider().getJsonDataNoAuth(url);
       _serverVersion = dt['serverVersion'];
       _serverVersion = dt['serverVersion'];
+      validLang = dt["_validLang"];
       CacheMan.writeData(url, _serverVersion);
       CacheMan.writeData(url, _serverVersion);
     } catch (error) {
     } catch (error) {
       var val = await CacheMan.readData(url);
       var val = await CacheMan.readData(url);
@@ -321,6 +323,27 @@ class U {
     // print('checking current server version: $_serverVersion');
     // print('checking current server version: $_serverVersion');
   }
   }
 
 
+  static String getLang(code){
+    if(code is int){
+      return validLang[code+1];
+    } else {
+      return code;
+    }
+  }
+
+  static String getLangIndex(code){
+    if(code == 'id' || code == 'en'){
+      return code;
+    } else {
+      var t = validLang.indexOf(code)-1;
+      return t.toString();
+    }
+  }
+
+  static List retValidLang(){
+    return validLang;
+  }
+
   static newServerVersion(int version){
   static newServerVersion(int version){
     return version <= _serverVersion;
     return version <= _serverVersion;
   }
   }
@@ -490,7 +513,8 @@ class U {
 
 
   static String langColumn(BuildContext context, String text){
   static String langColumn(BuildContext context, String text){
     var code = context.locale.toString();
     var code = context.locale.toString();
-    return code == 'id' ? text : '$text${code[0].toUpperCase()}${code.substring(1).toLowerCase()}';
+    var prefix = code == 'id' || code == 'en' && text.substring(1) != '_' ? '' : '_';
+    return code == 'id' ? text : '$prefix$text${code[0].toUpperCase()}${code.substring(1).toLowerCase()}';
   }
   }
 
 
   static bool hidePayload = false;
   static bool hidePayload = false;