geer-builder 1.2.437 → 1.2.439
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/GGcClaim.vue +38 -52
- package/GTransaction.vue +1 -1
- package/components/GProduct.vue +3 -3
- package/components/TransactionConfirmDialog.vue +3 -4
- package/components/VoidOption.vue +28 -17
- package/dialogs/GcClaimDIalog.vue +0 -1
- package/package.json +1 -1
package/GGcClaim.vue
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cashier-gc-claim" v-if="user_info">
|
|
3
|
-
<div class="header-holder">
|
|
4
|
-
<div class="gc-item
|
|
5
|
-
<
|
|
6
|
-
<div class="
|
|
7
|
-
<div class="label">GC Price:</div>
|
|
8
|
-
<div class="value">{{gc_item_price}}</div>
|
|
9
|
-
<!-- <div class="label">Current Stock:</div>
|
|
10
|
-
<div class="value">{{current_stock}}</div> -->
|
|
3
|
+
<div class="header-holder row">
|
|
4
|
+
<div class="gc-item col-5">
|
|
5
|
+
<g-product v-model="product_list" :gc="true" :cashier="true" :hide_button="true" @input="selectProduct"></g-product>
|
|
6
|
+
<div class="gc-price">GC Price: <span class="text-primary">{{gc_item_price}}</span></div>
|
|
11
7
|
</div>
|
|
12
|
-
<div class="
|
|
13
|
-
|
|
8
|
+
<div class="col-4"></div>
|
|
9
|
+
<div class="log-holder col-3">
|
|
10
|
+
<q-input label="Enter Name or Slot" outlined v-model="filterr"><template v-slot:append><q-icon name="search" /></template></q-input>
|
|
14
11
|
<div class="log" @click="is_gc_claim_log_open= true">view claim history</div>
|
|
15
12
|
</div>
|
|
16
13
|
</div>
|
|
@@ -26,7 +23,7 @@
|
|
|
26
23
|
</q-table>
|
|
27
24
|
</div>
|
|
28
25
|
<q-dialog v-model="is_claim_item_dialog_open">
|
|
29
|
-
<gc-claim-dialog :row="slot_info" :gc_item="
|
|
26
|
+
<gc-claim-dialog :row="slot_info" :gc_item="gc_product[0]" :cashier="cashier_info" @closePopup="is_claim_item_dialog_open = false"></gc-claim-dialog>
|
|
30
27
|
</q-dialog>
|
|
31
28
|
|
|
32
29
|
<q-dialog v-model="is_gc_claim_log_open">
|
|
@@ -40,29 +37,36 @@
|
|
|
40
37
|
|
|
41
38
|
<script>
|
|
42
39
|
import DB_SLOT from './models/DB_SLOT';
|
|
40
|
+
import DB_PRODUCT from './models/DB_PRODUCT';
|
|
43
41
|
import DB_INVENTORY from './models/DB_INVENTORY';
|
|
44
42
|
import GlobalMixins from './mixins/global_mixins.js';
|
|
45
43
|
import GcClaimDialog from './dialogs/GcClaimDIalog.vue';
|
|
46
44
|
import GcClaimLogDialog from './dialogs/GcClaimLogDialog.vue';
|
|
45
|
+
import GProduct from "./components/GProduct";
|
|
46
|
+
import { networkInterfaces } from 'os';
|
|
47
|
+
|
|
47
48
|
|
|
48
49
|
export default
|
|
49
50
|
{
|
|
50
|
-
components:{GcClaimDialog, GcClaimLogDialog},
|
|
51
|
+
components:{GcClaimDialog, GcClaimLogDialog, GProduct},
|
|
51
52
|
mixins: [GlobalMixins],
|
|
52
53
|
filters: { },
|
|
53
54
|
data:() =>(
|
|
54
55
|
{
|
|
56
|
+
db_product: new DB_PRODUCT(),
|
|
57
|
+
gc_product:[],
|
|
58
|
+
product_list:[],
|
|
55
59
|
is_gc_claim_log_open:false,
|
|
56
60
|
cashier_info:{},
|
|
57
61
|
slot_info:{},
|
|
58
62
|
is_claim_item_dialog_open:false,
|
|
59
63
|
gc_item_product:{},
|
|
60
64
|
gc_item_name:'',
|
|
61
|
-
gc_item_price:
|
|
65
|
+
gc_item_price:0,
|
|
62
66
|
db_slot: new DB_SLOT(),
|
|
63
67
|
db_inventory: new DB_INVENTORY(),
|
|
64
68
|
slot_list:[],
|
|
65
|
-
loading_table:
|
|
69
|
+
loading_table:false,
|
|
66
70
|
filterr: '',
|
|
67
71
|
pagination: { rowsPerPage: 8 },
|
|
68
72
|
table_column:
|
|
@@ -109,9 +113,7 @@ export default
|
|
|
109
113
|
}),
|
|
110
114
|
watch:
|
|
111
115
|
{
|
|
112
|
-
|
|
113
|
-
this.getInventory();
|
|
114
|
-
}
|
|
116
|
+
|
|
115
117
|
},
|
|
116
118
|
computed:
|
|
117
119
|
{
|
|
@@ -120,33 +122,26 @@ export default
|
|
|
120
122
|
async mounted()
|
|
121
123
|
{
|
|
122
124
|
await this.$_getSlotInfo();
|
|
123
|
-
await this.
|
|
124
|
-
await this.getInventory();
|
|
125
|
+
await this.$bind('slot_list', this.db_slot.collection().where("points.gc", ">=", 0));
|
|
125
126
|
|
|
126
127
|
this.cashier_info = this.current_slot_info;
|
|
127
128
|
},
|
|
128
129
|
methods:
|
|
129
130
|
{
|
|
130
|
-
async
|
|
131
|
+
async selectProduct()
|
|
131
132
|
{
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
await this.$bind('gc_product', this.db_product.collection().where("product_id", "==", this.product_list[0].product_id));
|
|
134
|
+
if(this.product_list.length > 0)
|
|
135
|
+
{
|
|
136
|
+
this.gc_item_price = this.gc_product[0].gc_price;
|
|
137
|
+
await this.$bind('slot_list', this.db_slot.collection().where("points.gc", ">=", this.gc_product[0].gc_price));
|
|
138
|
+
this.loading_table = false;
|
|
139
|
+
}
|
|
134
140
|
},
|
|
135
141
|
async view(event,row)
|
|
136
142
|
{
|
|
137
143
|
this.slot_info = row;
|
|
138
144
|
this.is_claim_item_dialog_open = true;
|
|
139
|
-
},
|
|
140
|
-
async getGcPrice()
|
|
141
|
-
{
|
|
142
|
-
if(this.current_slot_info && this.current_slot_info.hasOwnProperty('gc_inclusive'))
|
|
143
|
-
{
|
|
144
|
-
this.gc_item_price = this.current_slot_info.gc_inclusive[0].product.gc_price;
|
|
145
|
-
this.gc_item_name = this.current_slot_info.gc_inclusive[0].product.product_name;
|
|
146
|
-
this.gc_item_product = this.current_slot_info.gc_inclusive[0].product;
|
|
147
|
-
}
|
|
148
|
-
await this.$bind('slot_list', this.db_slot.collection().where("points.gc", ">=", this.gc_item_price));
|
|
149
|
-
this.loading_table = false;
|
|
150
145
|
}
|
|
151
146
|
},
|
|
152
147
|
computed:
|
|
@@ -160,30 +155,21 @@ export default
|
|
|
160
155
|
width: 900px;
|
|
161
156
|
padding: 30px;
|
|
162
157
|
.header-holder{
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
.gc-price{
|
|
159
|
+
text-align: left;
|
|
160
|
+
padding: 5px 10px;
|
|
161
|
+
font-size: 18px;
|
|
162
|
+
}
|
|
165
163
|
.log-holder{
|
|
166
164
|
.log{
|
|
167
|
-
padding: 5px 5px;
|
|
168
|
-
text-align: right;
|
|
169
165
|
color: $primary;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
font-size: 16px;
|
|
175
|
-
padding: 20px;
|
|
176
|
-
width: 500px;
|
|
177
|
-
display: grid;
|
|
178
|
-
grid-template-columns:30% 1fr;
|
|
179
|
-
text-align: left;
|
|
180
|
-
.label{
|
|
181
|
-
font-weight: 500;
|
|
182
|
-
}
|
|
183
|
-
.value{
|
|
184
|
-
color:$primary;
|
|
166
|
+
text-align: right;
|
|
167
|
+
padding: 5px 0;
|
|
168
|
+
font-size: 18px;
|
|
169
|
+
cursor:pointer;
|
|
185
170
|
}
|
|
186
171
|
}
|
|
172
|
+
margin: 10px auto;
|
|
187
173
|
}
|
|
188
174
|
.content
|
|
189
175
|
{
|
package/GTransaction.vue
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
</q-card-section>
|
|
70
70
|
|
|
71
71
|
<q-dialog v-model="is_dialog_printable_open">
|
|
72
|
-
<transaction-confirm-dialog :hide_bottom="true" @closePopup="is_dialog_printable_open = false; $emit('closePopup')" :sale_id="row.sale_id" :status="row.status"></transaction-confirm-dialog>
|
|
72
|
+
<transaction-confirm-dialog :current_user="user_info" :hide_bottom="true" @closePopup="is_dialog_printable_open = false; $emit('closePopup')" :sale_id="row.sale_id" :status="row.status"></transaction-confirm-dialog>
|
|
73
73
|
</q-dialog>
|
|
74
74
|
<q-dialog v-model="is_report_dialog_open">
|
|
75
75
|
<released-item-report></released-item-report>
|
package/components/GProduct.vue
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<td class="product-name">
|
|
7
7
|
<q-select outlined @input="emitFields()" v-model="field.product" :option-label="(item) => item.hasOwnProperty('sku') ? `${item.sku} (${item.product_name})` : `[ Select Item ]` " option-value="id" :options="product_list" dense></q-select>
|
|
8
8
|
</td>
|
|
9
|
-
<td class="product-qty" width="150px">
|
|
9
|
+
<td class="product-qty" width="150px" v-show="!hide_button">
|
|
10
10
|
<q-input outlined @input="emitFields()" v-model="field.quantity" dense></q-input>
|
|
11
11
|
</td>
|
|
12
|
-
<td class="product-btn" width="50px" v-if="!incentive_product">
|
|
12
|
+
<td class="product-btn" width="50px" v-if="!incentive_product" v-show="!hide_button">
|
|
13
13
|
<q-btn v-if="fields.length == i+1" @click="addProduct()" class="full-width" outline unelevated color="accent">
|
|
14
14
|
<q-icon name="fa fa-plus" size="12px"></q-icon>
|
|
15
15
|
</q-btn>
|
|
@@ -40,7 +40,7 @@ export default
|
|
|
40
40
|
},
|
|
41
41
|
],
|
|
42
42
|
}),
|
|
43
|
-
props: ['value', 'filter', 'cashier', 'gc', 'incentive_product'],
|
|
43
|
+
props: ['value', 'filter', 'cashier', 'gc', 'incentive_product', 'hide_button'],
|
|
44
44
|
mounted()
|
|
45
45
|
{
|
|
46
46
|
this.emitFields();
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<q-icon name="fa fa-check" size="14px" class="q-mr-sm"></q-icon>
|
|
45
45
|
Process Sale
|
|
46
46
|
</q-btn>
|
|
47
|
-
<q-btn v-if="status == this.pick_up" @click="voidSale()" color="primary" style="margin-right: 5px" unelevated>
|
|
47
|
+
<q-btn v-if="status == this.pick_up && this.user_info.hasOwnProperty('void') && this.user_info.void == true" @click="voidSale()" color="primary" style="margin-right: 5px" unelevated>
|
|
48
48
|
<q-icon name="fa fa-trash" size="14px" class="q-mr-sm"></q-icon>
|
|
49
49
|
Void Sale
|
|
50
50
|
</q-btn>
|
|
@@ -81,6 +81,7 @@ import SlotCodeDialog from "../components/SlotCodeDialog";
|
|
|
81
81
|
import SaleChooseSlotDialog from "../components/SaleChooseSlotDialog";
|
|
82
82
|
import VoidOption from "../components/VoidOption";
|
|
83
83
|
import SaleInvoice from "../components/SaleInvoice";
|
|
84
|
+
import { log } from 'util';
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
|
|
@@ -100,12 +101,10 @@ export default {
|
|
|
100
101
|
pick_up: 'for pick up',
|
|
101
102
|
pending:"pending",
|
|
102
103
|
void:"void",
|
|
103
|
-
|
|
104
|
-
|
|
105
104
|
}),
|
|
106
105
|
props: ['sale_id', 'hide_bottom','status'],
|
|
107
106
|
async mounted()
|
|
108
|
-
{
|
|
107
|
+
{
|
|
109
108
|
await this.$bind('sale', this.db_sale.doc(this.sale_id));
|
|
110
109
|
await this.$bind('user', this.db_user.doc(this.sale.customer.uid));
|
|
111
110
|
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
<script>
|
|
29
|
+
import { log } from 'util';
|
|
29
30
|
import GlobalMixins from '../mixins/global_mixins.js';
|
|
30
31
|
|
|
31
32
|
|
|
@@ -40,29 +41,39 @@ export default
|
|
|
40
41
|
memo: "",
|
|
41
42
|
}),
|
|
42
43
|
|
|
43
|
-
mounted()
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
mounted()
|
|
45
|
+
{
|
|
46
|
+
|
|
47
|
+
},
|
|
46
48
|
methods: {
|
|
47
|
-
async voidSale()
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
async voidSale()
|
|
50
|
+
{
|
|
51
|
+
if(!this.user_info.hasOwnProperty('void'))
|
|
50
52
|
{
|
|
51
|
-
this.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.$
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
this.$q.dialog({ title: "Something's not quite right", message: 'This account cannot void transaction. Please contact administrator to void.'});
|
|
54
|
+
}
|
|
55
|
+
else if(this.user_info.hasOwnProperty('void') && this.user_info.void == false)
|
|
56
|
+
{
|
|
57
|
+
this.$q.dialog({ title: "Something's not quite right", message: 'This account cannot void transaction. Please contact administrator to void.'});
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
else
|
|
60
60
|
{
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
try
|
|
62
|
+
{
|
|
63
|
+
this.sale.memo = this.memo;
|
|
64
|
+
this.sale.void_info = this.user_info;
|
|
65
|
+
let sale = await this.$_fbCall('memberVoidSale', { sale: this.sale});
|
|
66
|
+
this.$q.dialog({ title: "Successfully Voided!", message: `Sale No. ${this.sale.sale_id} has been successfully void.` });
|
|
67
|
+
this.$q.loading.hide();
|
|
68
|
+
this.$emit('closePopup');
|
|
69
|
+
}
|
|
70
|
+
catch (error)
|
|
71
|
+
{
|
|
72
|
+
this.$q.loading.hide();
|
|
73
|
+
this.$q.dialog({ title: "Something's not quite right", message: error.message });
|
|
74
|
+
}
|
|
63
75
|
}
|
|
64
76
|
},
|
|
65
|
-
|
|
66
77
|
},
|
|
67
78
|
computed: { }
|
|
68
79
|
}
|