geer-builder 1.2.703 → 1.2.704

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GProcessSale.vue CHANGED
@@ -126,7 +126,7 @@
126
126
  <div class="product-list">
127
127
  <g-product v-model="field.product_list" :key="component_key" @input="updateTable" :cashier=true></g-product>
128
128
  </div>
129
- <div class="fields row">
129
+ <div class="fields row" v-if="is_allowed_payment_cd === true">
130
130
  <div class="col-md-2">
131
131
  <div class="bill_checkbox" v-if="is_special_binary_cd">
132
132
  <q-checkbox v-model="special_cd_pay" @input="cdWalletonCheck" /> Pay CD
@@ -297,6 +297,7 @@ export default
297
297
  is_process_sale_dialog_open: false,
298
298
  is_dialog_confirm_open: false,
299
299
  is_inventory_dialog_open: false,
300
+ is_allowed_payment_cd: false,
300
301
  is_special_binary_cd: false,
301
302
  special_cd_pay:false,
302
303
  special_cd_pay_amount:0,
@@ -349,6 +350,9 @@ export default
349
350
  {
350
351
  this.field.stockist = this.stockist;
351
352
  }
353
+
354
+
355
+ this.is_allowed_payment_cd = this.user_info.cashier_allow_cd_payment == "Yes" ? true : false;
352
356
  },
353
357
  computed:
354
358
  {
package/GSlotWallet.vue CHANGED
@@ -88,6 +88,14 @@
88
88
  <div v-else>Wallet Logs</div>
89
89
  </q-btn>
90
90
  </div>
91
+ <div v-if="current_slot_info.slot_type == 'CD' && current_slot_info.is_special_cd == true" class="button-holder" style="cursor:pointer;" @click="is_wallet_cd_pay_dialog_open=true;">
92
+ <q-btn size="12px" class="full-width q-pa-sm text-primary" flat>
93
+ <div class="icon-holder">
94
+ <q-icon class="q-mr-sm" name="fas fa-wallet" size="16px"></q-icon>
95
+ </div>
96
+ <div>Pay CD</div>
97
+ </q-btn>
98
+ </div>
91
99
  </div>
92
100
 
93
101
  <div class="setion-holder points-holder">
@@ -223,6 +231,10 @@
223
231
  <wallet-logs-dialog/>
224
232
  </q-dialog>
225
233
 
234
+ <q-dialog v-model="is_wallet_cd_pay_dialog_open" :maximized="true">
235
+ <wallet-pay-cd-dialog @closeDialog="is_wallet_cd_pay_dialog_open = false" />
236
+ </q-dialog>
237
+
226
238
  <q-dialog v-model="is_wallet_binary_cd_logs">
227
239
  <wallet-logs-dialog :hide_search="true" :special_binary="true" />
228
240
  </q-dialog>
@@ -257,6 +269,7 @@ import UpCoinDialog from './components/GSlotWallet/UpCoinLogsDia
257
269
  import PointsLogsDialog from './components/Points/PointsLogs';
258
270
  import RCLogsDialog from './components/Points/RCLogs';
259
271
  import WalletLogsDialog from './components/GSlotWallet/WalletLogsDialog';
272
+ import WalletPayCdDialog from './components/GSlotWallet/WalletPayCDDialog';
260
273
  import BinaryHistory from './dialogs/BinaryHistory.vue';
261
274
  // import AddSlotDialog from '../../Dialogs/AddSlotDialog';
262
275
  import GlobalMixins from './mixins/global_mixins.js';
@@ -267,7 +280,7 @@ import DB_STAT from './models/DB_STAT';
267
280
 
268
281
  export default
269
282
  {
270
- components: { BinaryHistory, GCard, TempWalletDialog, GcLogsDialog,WalletLogsDialog, PointsLogsDialog, UpCoinDialog, RCLogsDialog},
283
+ components: { BinaryHistory, GCard, TempWalletDialog, GcLogsDialog,WalletLogsDialog, PointsLogsDialog, UpCoinDialog, RCLogsDialog, WalletPayCdDialog},
271
284
  mixins: [GlobalMixins],
272
285
  props:{
273
286
  binary_type: String,
@@ -285,6 +298,7 @@ export default
285
298
  ({
286
299
  is_binary_pv_combination: false,
287
300
  is_rc_logs_dialog_open: false,
301
+ is_wallet_cd_pay_dialog_open: false,
288
302
  is_wallet_binary_cd_logs: false,
289
303
  is_binary_history_dialog_open: false,
290
304
  is_open_add_slot_dialog: false,
@@ -0,0 +1,154 @@
1
+ <template>
2
+ <q-card style="max-width: 400px; max-height: 400px;" class="g-pay-cd-wallet">
3
+ <q-bar class="bg-primary text-white q-pa-lg">
4
+ <q-icon class="q-mr-sm" name="fa fa-splotch"></q-icon>
5
+ <b>Pay CD</b>
6
+ <q-space />
7
+
8
+ <q-btn dense flat icon="close" v-close-popup>
9
+ <q-tooltip content-class="bg-white text-primary">Close</q-tooltip>
10
+ </q-btn>
11
+ </q-bar>
12
+ <q-card-section v-if="current_slot_info">
13
+ <div class="q-pt-md grid-item">
14
+ <div class="section-holder">
15
+ <div class="label" style="font-size:20px;">Wallet</div>
16
+ <div class="value text-primary" style="font-size:20px;">{{ $_formatNumber(current_slot_info.wallet) }}</div>
17
+ </div>
18
+ </div>
19
+ <div class="q-pt-md grid-item">
20
+ <div class="section-holder">
21
+ <div class="label" style="font-size:20px;">Current CD</div>
22
+ <div class="value text-primary" style="font-size:20px;">{{ $_formatNumber(current_slot_info.special_cd_wallet) }}</div>
23
+ </div>
24
+ </div>
25
+ <div class="q-pt-md grid-item">
26
+ <div class="section-holder">
27
+ <div class="label" style="font-size:20px;">Pay wallet to CD</div>
28
+ <div class="value text-primary" style="font-size:20px;">
29
+ <q-input placeholder="Amount to use for cd" @input="checkInput()" outlined dense v-model="amount_to_pay"></q-input>
30
+ </div>
31
+ </div>
32
+ <div class="set q-mt-md">
33
+ <q-btn @click="submitpayCD()" :loading="submit_loading" type="submit" class="full-width" color="primary" unelevated :disabled="this.amount_to_pay == 0">
34
+ <q-icon name="fa fa-check" class="q-mr-sm" size="16px"></q-icon>
35
+ Pay
36
+ </q-btn>
37
+ </div>
38
+ </div>
39
+ </q-card-section>
40
+ </q-card>
41
+ </template>
42
+
43
+ <script>
44
+ import DB_SLOT from '../../models/DB_SLOT';
45
+ import { formatNumber } from '../../utilities/NumberUtils';
46
+
47
+ export default
48
+ {
49
+ props: [],
50
+ data: () =>
51
+ ({
52
+ search: '',
53
+ amount_to_pay: 0,
54
+ amount_to_pay_max: 0,
55
+ submit_loading:false
56
+ }),
57
+ async mounted()
58
+ {
59
+ await this.$_getSlotInfo();
60
+ this.loadSlotInfo();
61
+ },
62
+ methods:
63
+ {
64
+ async loadSlotInfo()
65
+ {
66
+ this.amount_to_pay_max = -1 * this.current_slot_info.special_cd_wallet;
67
+ },
68
+ checkInput()
69
+ {
70
+ if(this.amount_to_pay < 0)
71
+ {
72
+ this.amount_to_pay = 0;
73
+ }
74
+ else if(this.amount_to_pay > this.amount_to_pay_max)
75
+ {
76
+ this.amount_to_pay = this.amount_to_pay_max;
77
+ }
78
+ },
79
+ async submitpayCD()
80
+ {
81
+ if(this.amount_to_pay == 0)
82
+ {
83
+ return false;
84
+ }
85
+
86
+ this.$q.dialog({
87
+ title: 'Confirmation',
88
+ message: 'Are you sure you want to pay CD using wallet',
89
+ cancel: true,
90
+ persistent: true
91
+ }).onOk(async () => {
92
+ try
93
+ {
94
+ this.submit_loading = true;
95
+ this.$q.loading.show();
96
+ try
97
+ {
98
+ await this.$_fbCall('memberPayCD', {slot_code: this.current_slot_info.slot_code, amount_to_pay: this.amount_to_pay});
99
+ this.$q.loading.hide();
100
+ this.submit_loading = false;
101
+ this.$q.dialog({ title: `Success!`, message: 'Successfully paid.', html: true });
102
+ }
103
+ catch (error)
104
+ {
105
+ this.$q.loading.hide();
106
+ this.submit_loading = false;
107
+ this.$q.dialog({ title: `Something's not quite right`, message: error.message });
108
+ }
109
+ }
110
+ catch (e)
111
+ {
112
+ console.log(e);
113
+ }
114
+ finally
115
+ {
116
+ this.$emit('closeDialog');
117
+ this.$q.loading.hide();
118
+ this.submit_loading = false;
119
+ }
120
+ })
121
+ }
122
+ },
123
+ }
124
+ </script>
125
+
126
+ <style lang="scss">
127
+ .g-pay-cd-wallet{
128
+ .rc-holder
129
+ {
130
+ width: 100%;
131
+ }
132
+
133
+ .wallet-grid{
134
+ display: grid;
135
+ grid-template-columns: 1fr;
136
+ @media (max-width: 780px) {
137
+ grid-template-columns: 1fr !important;
138
+ }
139
+ }
140
+ .rc-holder
141
+ {
142
+ width: 100%;
143
+ }
144
+ .label {
145
+ font-size: 14px;
146
+ // color: $text-color;
147
+ }
148
+ .value {
149
+ font-size: 20px;
150
+ font-weight: bold;
151
+ }
152
+ }
153
+
154
+ </style>
@@ -44,11 +44,11 @@
44
44
 
45
45
  <!-- FIELD - FREE SHIPPING OPTIONS -->
46
46
  <div class="col-3">
47
- <div class="q-mt-sm q-ma-sm"><q-select @input="changeFreeShipping" outlined v-model="free_shipping" label="Free Shipping" :options="free_shipping_options" stack-label></q-select></div>
47
+ <!-- <div class="q-mt-sm q-ma-sm"><q-select @input="changeFreeShipping" outlined v-model="free_shipping" label="Free Shipping" :options="free_shipping_options" stack-label></q-select></div> -->
48
48
  </div>
49
49
  <!-- FIELD - MERCHANT FREE SHIPPING OPTIONS -->
50
50
  <div class="col-6">
51
- <div class="q-mt-sm q-ma-sm"><q-select @input="changeFreeShipping" outlined v-model="merchant_free_shipping_fee" label="Merchant will bear the shipping fee" :options="merchant_free_shipping_options" stack-label></q-select></div>
51
+ <div class="q-mt-sm q-ma-sm"><q-select @input="changeFreeShipping" outlined v-model="merchant_free_shipping_fee" label="Merchant will shoulder the shipping fee" :options="merchant_free_shipping_options" stack-label></q-select></div>
52
52
  </div>
53
53
  <div class="col-12">
54
54
  <div class="q-mt-sm q-ma-sm"><q-editor placeholder="Product Description" v-model="product_details.description" max-height="30px" /></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.703",
3
+ "version": "1.2.704",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {