ali 1 год назад
Родитель
Сommit
4144f1d753

+ 2 - 2
src/components/Widgets/Store/Basket/AdminStoreBasketList/AdminStoreBasketList.vue

@@ -41,11 +41,11 @@
 </template>
 
 <script>
+import Assist from 'assets/js/Assist.js'
 import { EntityIndex } from 'quasar-crud'
 import { Basket } from 'src/models/Basket.js'
 import { mixinWidget } from 'src/mixin/Mixins.js'
 import { APIGateway } from 'src/api/APIGateway.js'
-import Assist from 'assets/js/Assist'
 
 export default {
   name: 'AdminBasketList',
@@ -103,7 +103,7 @@ export default {
             required: true,
             label: 'نوع سفارش',
             align: 'left',
-            field: () => '-'
+            field: (row) => row.order_type ? new Basket(row).order_type_info.label : '-'
           },
           {
             name: 'overall_order_price',

+ 2 - 2
src/components/Widgets/Store/Basket/UserStoreBasketList/UserStoreBasketList.vue

@@ -34,11 +34,11 @@
 </template>
 
 <script>
+import Assist from 'assets/js/Assist.js'
 import { EntityIndex } from 'quasar-crud'
 import { Basket } from 'src/models/Basket.js'
 import { mixinWidget } from 'src/mixin/Mixins.js'
 import { APIGateway } from 'src/api/APIGateway.js'
-import Assist from 'assets/js/Assist'
 
 export default {
   name: 'UserStoreBasketList',
@@ -96,7 +96,7 @@ export default {
             required: true,
             label: 'نوع سفارش',
             align: 'left',
-            field: () => '-'
+            field: (row) => row.order_type ? new Basket(row).order_type_info.label : '-'
           },
           {
             name: 'overall_order_price',

+ 19 - 0
src/models/Basket.js

@@ -20,6 +20,7 @@ class Basket extends Model {
       },
       { key: 'description' },
       { key: 'status' },
+      { key: 'order_type' },
       {
         key: 'price',
         default: 0
@@ -101,6 +102,24 @@ class Basket extends Model {
             value: 'SENT'
           }
         ]
+      },
+      order_type: {
+        infoKey: 'order_type_info',
+        enumListKey: 'order_typeEnums',
+        enums: [
+          {
+            label: 'فیزیکی',
+            value: 'PHYSICAL'
+          },
+          {
+            label: 'مجازی',
+            value: 'VIRTUAL'
+          },
+          {
+            label: 'فیزیکی و مجازی',
+            value: 'PHYSICAL_VIRTUAL'
+          }
+        ]
       }
     })
   }