meemup-library 1.3.47 → 1.3.48
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/dist/controllers/ApiController.d.ts +10 -11
- package/dist/controllers/ApiController.js +160 -69
- package/dist/controllers/ColorController.d.ts +1 -1
- package/dist/controllers/CustomerFacingDisplayPacketController.d.ts +3 -3
- package/dist/controllers/DashboardController.d.ts +7 -7
- package/dist/controllers/DashboardController.js +1 -1
- package/dist/controllers/OrderScreenController.d.ts +2 -2
- package/dist/controllers/OrderToolController.d.ts +21 -21
- package/dist/controllers/OrderToolController.js +1 -1
- package/dist/controllers/ProductModalController.d.ts +3 -3
- package/dist/interfaces/IKitchenOrderDetail.js +1 -1
- package/dist/interfaces/IStore.d.ts +4 -4
- package/dist/interfaces/IUdpPacket.d.ts +2 -2
- package/dist/interfaces/IUdpPacket.js +1 -1
- package/dist/interfaces/pos/IPointOfSaleApiShop.d.ts +1 -1
- package/dist/interfaces/pos/IPointOfSaleApiShop.js +1 -1
- package/dist/interfaces/{order/IOrder.d.ts → pos/IPointOfSaleOrder.d.ts} +8 -8
- package/dist/interfaces/{order/IOrder.js → pos/IPointOfSaleOrder.js} +1 -1
- package/dist/interfaces/{order/IOrderExtraItem.d.ts → pos/IPointOfSaleOrderExtraItem.d.ts} +2 -2
- package/dist/interfaces/{order/IOrderItem.d.ts → pos/IPointOfSaleOrderItem.d.ts} +4 -4
- package/dist/interfaces/{order/IOrderPayment.d.ts → pos/IPointOfSaleOrderPayment.d.ts} +1 -1
- package/dist/interfaces/{order/IOrderTable.d.ts → pos/IPointOfSaleOrderTable.d.ts} +1 -1
- package/dist/interfaces/pos/IPointOfSaleRefundForm.d.ts +2 -2
- package/dist/interfaces/{IPointOfSaleReportForm.d.ts → pos/IPointOfSaleReportForm.d.ts} +1 -1
- package/dist/interfaces/{IPointOfSaleReportForm.js → pos/IPointOfSaleReportForm.js} +1 -1
- package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrder.d.ts +2 -2
- package/dist/interfaces/{IPointOfSaleSetting.d.ts → pos/IPointOfSaleSetting.d.ts} +8 -8
- package/dist/interfaces/{IPointOfSaleSetting.js → pos/IPointOfSaleSetting.js} +9 -9
- package/dist/interfaces/{IPointOfSaleSettingFee.d.ts → pos/IPointOfSaleSettingFee.d.ts} +1 -1
- package/dist/interfaces/pos/IPointOfSaleStore.d.ts +27 -0
- package/dist/interfaces/print/IOrderDetails.d.ts +2 -2
- package/package.json +2 -2
- package/dist/interfaces/IPointOfSaleStore.d.ts +0 -27
- /package/dist/interfaces/{IPointOfSalePreviousOrder.js → pos/IPointOfSaleOrderExtraItem.js} +0 -0
- /package/dist/interfaces/{IPointOfSalePreviousOrderItem.js → pos/IPointOfSaleOrderItem.js} +0 -0
- /package/dist/interfaces/{IPointOfSalePreviousOrderItemExtra.js → pos/IPointOfSaleOrderPayment.js} +0 -0
- /package/dist/interfaces/{IPointOfSaleSettingFee.js → pos/IPointOfSaleOrderTable.js} +0 -0
- /package/dist/interfaces/{IPointOfSalePreviousOrder.d.ts → pos/IPointOfSalePreviousOrder.d.ts} +0 -0
- /package/dist/interfaces/{IPointOfSaleSettingPrintsOnNewOrder.js → pos/IPointOfSalePreviousOrder.js} +0 -0
- /package/dist/interfaces/{IPointOfSalePreviousOrderItem.d.ts → pos/IPointOfSalePreviousOrderItem.d.ts} +0 -0
- /package/dist/interfaces/{IPointOfSaleStore.js → pos/IPointOfSalePreviousOrderItem.js} +0 -0
- /package/dist/interfaces/{IPointOfSalePreviousOrderItemExtra.d.ts → pos/IPointOfSalePreviousOrderItemExtra.d.ts} +0 -0
- /package/dist/interfaces/{order/IOrderExtraItem.js → pos/IPointOfSalePreviousOrderItemExtra.js} +0 -0
- /package/dist/interfaces/{IPointOfSalePrintParts.d.ts → pos/IPointOfSalePrintParts.d.ts} +0 -0
- /package/dist/interfaces/{IPointOfSalePrintParts.js → pos/IPointOfSalePrintParts.js} +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrder.js +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderAnswer.d.ts +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderAnswer.js +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderCustomer.d.ts +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderCustomer.js +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderDiscount.d.ts +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderDiscount.js +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderProduct.d.ts +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderProduct.js +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderProductExtra.d.ts +0 -0
- /package/dist/interfaces/{order → pos}/IPointOfSaleSaveOrderProductExtra.js +0 -0
- /package/dist/interfaces/{order/IOrderItem.js → pos/IPointOfSaleSettingFee.js} +0 -0
- /package/dist/interfaces/{IPointOfSaleSettingPrintsOnNewOrder.d.ts → pos/IPointOfSaleSettingPrintsOnNewOrder.d.ts} +0 -0
- /package/dist/interfaces/{order/IOrderPayment.js → pos/IPointOfSaleSettingPrintsOnNewOrder.js} +0 -0
- /package/dist/interfaces/{order/IOrderTable.js → pos/IPointOfSaleStore.js} +0 -0
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { AxiosError, AxiosInstance, AxiosResponse } from "axios";
|
|
2
1
|
import IAccount from "../interfaces/IAccount";
|
|
3
2
|
import IAnswer from "../interfaces/IAnswer";
|
|
4
3
|
import IDriverAccount from "../interfaces/IDriverAccount";
|
|
5
4
|
export default class ApiController {
|
|
6
|
-
account
|
|
7
|
-
constructor(account: IAccount
|
|
5
|
+
private account;
|
|
6
|
+
constructor(account: IAccount & IDriverAccount);
|
|
8
7
|
defaultHeader(authorization?: boolean): Promise<{
|
|
9
8
|
Authorization?: string | undefined;
|
|
10
9
|
companyId: string;
|
|
11
10
|
}>;
|
|
12
|
-
|
|
13
|
-
fetchSuccess(response:
|
|
14
|
-
fetchError(error:
|
|
15
|
-
postWithAuth(url: string, body?: any,
|
|
16
|
-
putWithAuth(url: string, body: any,
|
|
17
|
-
getWithAuth(url: string,
|
|
18
|
-
get(url: string,
|
|
19
|
-
deleteWithAuth(url: string,
|
|
11
|
+
fetchRequest(url: string, method: string, body?: any, headers?: object, authorization?: boolean, timeout?: number): Promise<IAnswer>;
|
|
12
|
+
fetchSuccess(response: any): IAnswer;
|
|
13
|
+
fetchError(error: any, message?: string): IAnswer;
|
|
14
|
+
postWithAuth: (url: string, body?: any, headers?: any) => Promise<IAnswer>;
|
|
15
|
+
putWithAuth: (url: string, body: any, headers?: any) => Promise<IAnswer>;
|
|
16
|
+
getWithAuth: (url: string, headers?: any) => Promise<IAnswer>;
|
|
17
|
+
get: (url: string, headers?: any) => Promise<IAnswer>;
|
|
18
|
+
deleteWithAuth: (url: string, headers?: any) => Promise<IAnswer>;
|
|
20
19
|
private getCompanyId;
|
|
21
20
|
}
|
|
@@ -7,92 +7,183 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import axios from "axios";
|
|
10
|
+
// import axios, {AxiosError, AxiosInstance, AxiosResponse} from "axios";
|
|
11
|
+
// export default class ApiController {
|
|
12
|
+
//
|
|
13
|
+
//
|
|
14
|
+
// account: IAccount | IDriverAccount;
|
|
15
|
+
//
|
|
16
|
+
// constructor(account: IAccount | IDriverAccount) {
|
|
17
|
+
// this.account = account;
|
|
18
|
+
// }
|
|
19
|
+
//
|
|
20
|
+
// async defaultHeader(authorization: boolean = true) {
|
|
21
|
+
//
|
|
22
|
+
// return {
|
|
23
|
+
// companyId: this.getCompanyId(),
|
|
24
|
+
// ...authorization ? {Authorization: "Bearer " + this.account.token} : {}
|
|
25
|
+
// };
|
|
26
|
+
// }
|
|
27
|
+
//
|
|
28
|
+
// async createInstance(header: object = {}, authorization: boolean = true, timeout: number = 15000) {
|
|
29
|
+
//
|
|
30
|
+
// let data: any = await this.defaultHeader(authorization);
|
|
31
|
+
//
|
|
32
|
+
// return axios.create({
|
|
33
|
+
// withCredentials: true,
|
|
34
|
+
// timeout: timeout,
|
|
35
|
+
// headers: {
|
|
36
|
+
// ...data,
|
|
37
|
+
// ...header
|
|
38
|
+
// }
|
|
39
|
+
// });
|
|
40
|
+
//
|
|
41
|
+
// }
|
|
42
|
+
//
|
|
43
|
+
// fetchSuccess(response: AxiosResponse, init: any = {}): IAnswer {
|
|
44
|
+
// if (response.status === 200) {
|
|
45
|
+
// if (response.data.success === true) {
|
|
46
|
+
// return response.data;
|
|
47
|
+
// }
|
|
48
|
+
// if (response.data.message === "company not found") {
|
|
49
|
+
// //TODO need fix
|
|
50
|
+
// return response.data;
|
|
51
|
+
// }
|
|
52
|
+
// } else if (response.status === 401) {
|
|
53
|
+
// //TODO need fix
|
|
54
|
+
// return response.data;
|
|
55
|
+
// // window.location.replace(rootPath.signIn);
|
|
56
|
+
// }
|
|
57
|
+
// return {
|
|
58
|
+
// ...response.data,
|
|
59
|
+
// data: init
|
|
60
|
+
// };
|
|
61
|
+
// }
|
|
62
|
+
//
|
|
63
|
+
// fetchError(error: AxiosError, initMessage = null): IAnswer {
|
|
64
|
+
//
|
|
65
|
+
//
|
|
66
|
+
// // console.log("error : ", error);
|
|
67
|
+
//
|
|
68
|
+
// const message = error.message === "Network Error" ? "Please check your internet connection!" : error.message;
|
|
69
|
+
//
|
|
70
|
+
//
|
|
71
|
+
// return {
|
|
72
|
+
// success: false,
|
|
73
|
+
// data: null,
|
|
74
|
+
// exception: initMessage ? initMessage : message,
|
|
75
|
+
// message: initMessage ? initMessage : message
|
|
76
|
+
// };
|
|
77
|
+
// }
|
|
78
|
+
//
|
|
79
|
+
// async postWithAuth(url: string, body: any = {}, header: any = {}): Promise<IAnswer> {
|
|
80
|
+
// // console.log("POST");
|
|
81
|
+
// const ax: any = await this.createInstance(header, true);
|
|
82
|
+
//
|
|
83
|
+
// return ax.post(url, body).then(this.fetchSuccess).catch(this.fetchError);
|
|
84
|
+
//
|
|
85
|
+
// }
|
|
86
|
+
//
|
|
87
|
+
// async putWithAuth(url: string, body: any, header: any = {}): Promise<IAnswer> {
|
|
88
|
+
// // console.log("PUT");
|
|
89
|
+
// const ax: any = await this.createInstance(header, true, 8000);
|
|
90
|
+
// return ax.put(url, body).then(this.fetchSuccess).catch(this.fetchError);
|
|
91
|
+
// }
|
|
92
|
+
//
|
|
93
|
+
// async getWithAuth(url: string, header: any = {}): Promise<IAnswer> {
|
|
94
|
+
// // console.log("GET");
|
|
95
|
+
// const ax: AxiosInstance = await this.createInstance(header, true);
|
|
96
|
+
// return ax.get(url).then(this.fetchSuccess).catch(this.fetchError);
|
|
97
|
+
//
|
|
98
|
+
// }
|
|
99
|
+
//
|
|
100
|
+
// async get(url: string, header: any = {}): Promise<IAnswer> {
|
|
101
|
+
// // console.log("GET");
|
|
102
|
+
// const ax: any = await this.createInstance(header, false);
|
|
103
|
+
// return ax.get(url).then(this.fetchSuccess).catch(this.fetchError);
|
|
104
|
+
// }
|
|
105
|
+
//
|
|
106
|
+
// async deleteWithAuth(url: string, header: any = {}): Promise<IAnswer> {
|
|
107
|
+
// // console.log("DELETE");
|
|
108
|
+
// const ax: any = await this.createInstance(header, true);
|
|
109
|
+
// return ax.delete(url).then(this.fetchSuccess).catch(this.fetchError);
|
|
110
|
+
// }
|
|
111
|
+
//
|
|
112
|
+
// private getCompanyId = (): string => {
|
|
113
|
+
//
|
|
114
|
+
// const account: any = {...this.account};
|
|
115
|
+
//
|
|
116
|
+
// if (account.companyId)
|
|
117
|
+
// return account.companyId + "";
|
|
118
|
+
//
|
|
119
|
+
// return account.company.id + "";
|
|
120
|
+
// }
|
|
121
|
+
//
|
|
122
|
+
// }
|
|
11
123
|
export default class ApiController {
|
|
12
124
|
constructor(account) {
|
|
125
|
+
this.account = account;
|
|
126
|
+
this.postWithAuth = (url, body = {}, headers = {}) => __awaiter(this, void 0, void 0, function* () { return this.fetchRequest(url, "POST", body, headers, true); });
|
|
127
|
+
this.putWithAuth = (url, body, headers = {}) => __awaiter(this, void 0, void 0, function* () { return this.fetchRequest(url, "PUT", body, headers, true); });
|
|
128
|
+
this.getWithAuth = (url, headers = {}) => __awaiter(this, void 0, void 0, function* () { return this.fetchRequest(url, "GET", null, headers, true); });
|
|
129
|
+
this.get = (url, headers = {}) => __awaiter(this, void 0, void 0, function* () { return this.fetchRequest(url, "GET", null, headers, false); });
|
|
130
|
+
this.deleteWithAuth = (url, headers = {}) => __awaiter(this, void 0, void 0, function* () { return this.fetchRequest(url, "DELETE", null, headers, true); });
|
|
13
131
|
this.getCompanyId = () => {
|
|
14
|
-
|
|
15
|
-
if (account.companyId)
|
|
16
|
-
return account.companyId + "";
|
|
17
|
-
return account.company.id + "";
|
|
132
|
+
var _a;
|
|
133
|
+
if ((_a = this.account) === null || _a === void 0 ? void 0 : _a.companyId)
|
|
134
|
+
return this.account.companyId + "";
|
|
135
|
+
return this.account.company.id + "";
|
|
18
136
|
};
|
|
19
|
-
this.account = account;
|
|
20
137
|
}
|
|
21
138
|
defaultHeader(authorization = true) {
|
|
22
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
return Object.assign({ companyId: this.getCompanyId() }, authorization ? { Authorization: "Bearer " + this.account.token } : {});
|
|
140
|
+
return Object.assign({ companyId: this.getCompanyId() }, (authorization ? { Authorization: "Bearer " + this.account.token } : {}));
|
|
24
141
|
});
|
|
25
142
|
}
|
|
26
|
-
|
|
143
|
+
fetchRequest(url, method, body = null, headers = {}, authorization = true, timeout = 15000) {
|
|
27
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
145
|
+
const controller = new AbortController();
|
|
146
|
+
const signal = controller.signal;
|
|
147
|
+
// Set timeout for the request
|
|
148
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
149
|
+
const defaultHeaders = yield this.defaultHeader(authorization);
|
|
150
|
+
const fetchOptions = {
|
|
151
|
+
method: method,
|
|
152
|
+
headers: Object.assign(Object.assign({ 'Content-Type': 'application/json' }, defaultHeaders), headers),
|
|
153
|
+
signal: signal
|
|
154
|
+
};
|
|
155
|
+
if (body) {
|
|
156
|
+
fetchOptions.body = JSON.stringify(body);
|
|
40
157
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
158
|
+
try {
|
|
159
|
+
const response = yield fetch(url, fetchOptions);
|
|
160
|
+
clearTimeout(timeoutId);
|
|
161
|
+
const data = yield response.json();
|
|
162
|
+
if (response.ok) {
|
|
163
|
+
return this.fetchSuccess(data);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
return this.fetchError(data, response.statusText);
|
|
167
|
+
}
|
|
44
168
|
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
clearTimeout(timeoutId);
|
|
171
|
+
return this.fetchError(error, "Network Error");
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
fetchSuccess(response) {
|
|
176
|
+
if (response.success) {
|
|
177
|
+
return response;
|
|
45
178
|
}
|
|
46
|
-
|
|
47
|
-
//TODO need fix
|
|
48
|
-
return response.data;
|
|
49
|
-
// window.location.replace(rootPath.signIn);
|
|
50
|
-
}
|
|
51
|
-
return Object.assign(Object.assign({}, response.data), { data: init });
|
|
179
|
+
return Object.assign(Object.assign({}, response), { data: null });
|
|
52
180
|
}
|
|
53
|
-
fetchError(error,
|
|
54
|
-
// console.log("error : ", error);
|
|
55
|
-
const message = error.message === "Network Error" ? "Please check your internet connection!" : error.message;
|
|
181
|
+
fetchError(error, message = "Unknown Error") {
|
|
56
182
|
return {
|
|
57
183
|
success: false,
|
|
58
184
|
data: null,
|
|
59
|
-
exception:
|
|
60
|
-
message:
|
|
185
|
+
exception: (error === null || error === void 0 ? void 0 : error.message) || message,
|
|
186
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || message
|
|
61
187
|
};
|
|
62
188
|
}
|
|
63
|
-
postWithAuth(url, body = {}, header = {}) {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
// console.log("POST");
|
|
66
|
-
const ax = yield this.createInstance(header, true);
|
|
67
|
-
return ax.post(url, body).then(this.fetchSuccess).catch(this.fetchError);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
putWithAuth(url, body, header = {}) {
|
|
71
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
// console.log("PUT");
|
|
73
|
-
const ax = yield this.createInstance(header, true, 8000);
|
|
74
|
-
return ax.put(url, body).then(this.fetchSuccess).catch(this.fetchError);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
getWithAuth(url, header = {}) {
|
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
// console.log("GET");
|
|
80
|
-
const ax = yield this.createInstance(header, true);
|
|
81
|
-
return ax.get(url).then(this.fetchSuccess).catch(this.fetchError);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
get(url, header = {}) {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
// console.log("GET");
|
|
87
|
-
const ax = yield this.createInstance(header, false);
|
|
88
|
-
return ax.get(url).then(this.fetchSuccess).catch(this.fetchError);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
deleteWithAuth(url, header = {}) {
|
|
92
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
// console.log("DELETE");
|
|
94
|
-
const ax = yield this.createInstance(header, true);
|
|
95
|
-
return ax.delete(url).then(this.fetchSuccess).catch(this.fetchError);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
189
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import IPointOfSaleSetting from "../interfaces/IPointOfSaleSetting";
|
|
1
|
+
import IPointOfSaleSetting from "../interfaces/pos/IPointOfSaleSetting";
|
|
2
2
|
import IProduct from "../interfaces/IProduct";
|
|
3
3
|
/**
|
|
4
4
|
* کلاس ColorController برای مدیریت رنگها و تولید رنگ متن بر اساس رنگ پس زمینه استفاده میشود.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import IPointOfSaleLocalSetting from "../interfaces/pos/IPointOfSaleLocalSetting";
|
|
2
|
-
import IPointOfSaleSetting from "../interfaces/IPointOfSaleSetting";
|
|
2
|
+
import IPointOfSaleSetting from "../interfaces/pos/IPointOfSaleSetting";
|
|
3
3
|
import ICustomerFacingDisplayPacket from "../interfaces/cfds/ICustomerFacingDisplayPacket";
|
|
4
|
-
import
|
|
4
|
+
import IPointOfSaleOrder from "../interfaces/pos/IPointOfSaleOrder";
|
|
5
5
|
declare const _default: {
|
|
6
|
-
code(order:
|
|
6
|
+
code(order: IPointOfSaleOrder, setting: IPointOfSaleSetting, localSetting: IPointOfSaleLocalSetting): ICustomerFacingDisplayPacket;
|
|
7
7
|
decode(data: string): ICustomerFacingDisplayPacket;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import IOnlineOrderItem from "../interfaces/IOnlineOrderItem";
|
|
2
2
|
import EnumDashboardSort from "../enums/EnumDashboardSort";
|
|
3
3
|
import EnumShowOrderMode from "../enums/EnumShowOrderMode";
|
|
4
|
-
import
|
|
4
|
+
import IPointOfSaleOrder from "../interfaces/pos/IPointOfSaleOrder";
|
|
5
5
|
declare const _default: {
|
|
6
6
|
showOrderModeText(mode: EnumShowOrderMode): string;
|
|
7
7
|
getSortTypeText(sort: EnumDashboardSort): string;
|
|
8
|
-
todayPosMoney(orders:
|
|
8
|
+
todayPosMoney(orders: IPointOfSaleOrder[]): number;
|
|
9
9
|
todayOnlineMoney(orders: IOnlineOrderItem[]): number;
|
|
10
|
-
todayMoney(localOrders:
|
|
11
|
-
todayOrderCount(localOrders:
|
|
10
|
+
todayMoney(localOrders: IPointOfSaleOrder[], onlineOrders: IOnlineOrderItem[], mode: EnumShowOrderMode): number;
|
|
11
|
+
todayOrderCount(localOrders: IPointOfSaleOrder[], onlineOrders: IOnlineOrderItem[], mode: EnumShowOrderMode): number;
|
|
12
12
|
customer(order: IOnlineOrderItem): string;
|
|
13
13
|
customerForDashboardComponent(order: IOnlineOrderItem): string;
|
|
14
14
|
sortOrders(orders: IOnlineOrderItem[], mode: EnumDashboardSort): IOnlineOrderItem[];
|
|
15
|
-
distinctAllOrders(localOrders:
|
|
16
|
-
createOrderList(localOrders:
|
|
17
|
-
orderModelToOnlineOrderItem(order:
|
|
15
|
+
distinctAllOrders(localOrders: IPointOfSaleOrder[], onlineOrders: IOnlineOrderItem[]): IOnlineOrderItem[];
|
|
16
|
+
createOrderList(localOrders: IPointOfSaleOrder[], onlineOrders: IOnlineOrderItem[], mode: EnumShowOrderMode, sort: EnumDashboardSort): IOnlineOrderItem[];
|
|
17
|
+
orderModelToOnlineOrderItem(order: IPointOfSaleOrder): IOnlineOrderItem;
|
|
18
18
|
getViaIcon(data: IOnlineOrderItem): "store" | "web" | undefined;
|
|
19
19
|
};
|
|
20
20
|
export default _default;
|
|
@@ -81,7 +81,7 @@ export default new class DashboardController {
|
|
|
81
81
|
// case EnumDashboardSort.discount:
|
|
82
82
|
// return orders.sort((a: IOnlineOrderItem, b: IOnlineOrderItem) => a.displayDiscount >= b.displayDiscount ? 1 : -1);
|
|
83
83
|
// case EnumDashboardSort.tip:
|
|
84
|
-
// return orders.sort((a:
|
|
84
|
+
// return orders.sort((a: IPointOfSaleOrder, b: IPointOfSaleOrder) => a.displayTip >= b.displayTip ? 1 : -1);
|
|
85
85
|
default:
|
|
86
86
|
return orders;
|
|
87
87
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EnumOrderType from "../enums/EnumOrderType";
|
|
2
|
-
import
|
|
2
|
+
import IPointOfSaleOrderItem from "../interfaces/pos/IPointOfSaleOrderItem";
|
|
3
3
|
import ICategory from "../interfaces/ICategory";
|
|
4
4
|
import IProduct from "../interfaces/IProduct";
|
|
5
5
|
declare const _default: {
|
|
@@ -8,6 +8,6 @@ declare const _default: {
|
|
|
8
8
|
fetchProducts(products: IProduct[], categories: ICategory[], categoryId: number, word?: string): IProduct[];
|
|
9
9
|
searchProduct(products: IProduct[], word: string): IProduct[];
|
|
10
10
|
productPrice(product: IProduct, orderType: EnumOrderType): number;
|
|
11
|
-
productCountInOrder(product: IProduct, items:
|
|
11
|
+
productCountInOrder(product: IProduct, items: IPointOfSaleOrderItem[]): number;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import EnumOrderType from "../enums/EnumOrderType";
|
|
2
|
-
import
|
|
3
|
-
import IPointOfSaleSetting from "../interfaces/IPointOfSaleSetting";
|
|
4
|
-
import
|
|
2
|
+
import IPointOfSaleOrderItem from "../interfaces/pos/IPointOfSaleOrderItem";
|
|
3
|
+
import IPointOfSaleSetting from "../interfaces/pos/IPointOfSaleSetting";
|
|
4
|
+
import IPointOfSaleOrder from "../interfaces/pos/IPointOfSaleOrder";
|
|
5
5
|
import EnumPaymentType from "../enums/EnumPaymentType";
|
|
6
6
|
import IOrderDetailProduct from "../interfaces/print/IOrderDetailProduct";
|
|
7
7
|
import IOrderDetailProductsExtra from "../interfaces/print/IOrderDetailProductsExtra";
|
|
8
|
-
import
|
|
8
|
+
import IPointOfSaleOrderExtraItem from "../interfaces/pos/IPointOfSaleOrderExtraItem";
|
|
9
9
|
import IZone from "../interfaces/IZone";
|
|
10
10
|
import IZoneCost from "../interfaces/IZoneCost";
|
|
11
11
|
import ILocation from "../interfaces/ILocation";
|
|
12
12
|
import ICalculateFeeResult from "../interfaces/ICalculateFeeResult";
|
|
13
13
|
import EnumChannels from "../enums/EnumChannels";
|
|
14
|
-
import IPointOfSaleSettingFee from "../interfaces/IPointOfSaleSettingFee";
|
|
14
|
+
import IPointOfSaleSettingFee from "../interfaces/pos/IPointOfSaleSettingFee";
|
|
15
15
|
import IPointOfSaleOrderSummary from "../interfaces/pos/IPointOfSaleOrderSummary";
|
|
16
16
|
import EnumCustomerMandatory from "../enums/EnumCustomerMandatory";
|
|
17
17
|
import IPointOfSaleSettingRewardProgram from "../interfaces/pos/IPointOfSaleSettingRewardProgram";
|
|
18
18
|
import ITextValue from "../interfaces/ITextValue";
|
|
19
19
|
declare class OrderToolController {
|
|
20
|
-
replaceItem(item:
|
|
21
|
-
paymentTypeText(order?:
|
|
20
|
+
replaceItem(item: IPointOfSaleOrderItem, items: IPointOfSaleOrderItem[]): IPointOfSaleOrderItem[];
|
|
21
|
+
paymentTypeText(order?: IPointOfSaleOrder | IPointOfSaleOrderSummary): string;
|
|
22
22
|
getPaymentTypeText(paymentType: EnumPaymentType, orderType: EnumOrderType): string;
|
|
23
|
-
getPaymentStateText(order?:
|
|
23
|
+
getPaymentStateText(order?: IPointOfSaleOrder | IPointOfSaleOrderSummary): string;
|
|
24
24
|
getOrderTypeText(orderType: EnumOrderType): string;
|
|
25
25
|
getOrderChannelText(channel: EnumChannels): string;
|
|
26
|
-
orderTypeText(order:
|
|
27
|
-
builtOrderDeliveryCost(form:
|
|
28
|
-
calculateItemsAmount(list:
|
|
26
|
+
orderTypeText(order: IPointOfSaleOrder | undefined, additionalPickupInstructionsTypes: ITextValue[]): string;
|
|
27
|
+
builtOrderDeliveryCost(form: IPointOfSaleOrder, zones: IZone[], checkDeliveryCoverageArea: boolean): IPointOfSaleOrder;
|
|
28
|
+
calculateItemsAmount(list: IPointOfSaleOrderItem[]): number;
|
|
29
29
|
calculateTax(taxPercentage: number, subTotal: number, discount: number, deliveryCost: number): number;
|
|
30
|
-
calculateDiscount(order:
|
|
31
|
-
calculateTip(order:
|
|
30
|
+
calculateDiscount(order: IPointOfSaleOrder, subTotal: number): number;
|
|
31
|
+
calculateTip(order: IPointOfSaleOrder, subTotal: number): number;
|
|
32
32
|
calculateReward(totalAmount: number, rewardProgram: IPointOfSaleSettingRewardProgram): number;
|
|
33
|
-
customerOrNull(order:
|
|
34
|
-
locationOrNull(order:
|
|
33
|
+
customerOrNull(order: IPointOfSaleOrder): any;
|
|
34
|
+
locationOrNull(order: IPointOfSaleOrder): {
|
|
35
35
|
longitude: number;
|
|
36
36
|
latitude: number;
|
|
37
37
|
} | null;
|
|
38
|
-
convertOrderExtraItemToOrderDetailProductsExtra(item:
|
|
39
|
-
convertOrderItemToOrderDetailProduct(item:
|
|
40
|
-
createExtraNames(item:
|
|
41
|
-
createExtraItemText(item:
|
|
38
|
+
convertOrderExtraItemToOrderDetailProductsExtra(item: IPointOfSaleOrderExtraItem): IOrderDetailProductsExtra;
|
|
39
|
+
convertOrderItemToOrderDetailProduct(item: IPointOfSaleOrderItem, currency: string): IOrderDetailProduct;
|
|
40
|
+
createExtraNames(item: IPointOfSaleOrderItem, currency: string): string;
|
|
41
|
+
createExtraItemText(item: IPointOfSaleOrderExtraItem, currency: string): string;
|
|
42
42
|
roundCashAmount(price: number, rounding: any): {
|
|
43
43
|
newPrice: number;
|
|
44
44
|
roundingRate: number;
|
|
@@ -46,9 +46,9 @@ declare class OrderToolController {
|
|
|
46
46
|
calcDeliveryCost: (displayTotalAmount: number, zone: IZone) => IZoneCost;
|
|
47
47
|
coveragesAddress(location: ILocation, zones: IZone[], checkDeliveryCoverageArea: boolean): boolean;
|
|
48
48
|
zonesThatCoverageLocation(location: ILocation, zones: IZone[]): IZone[];
|
|
49
|
-
calculateFee(companyFee: IPointOfSaleSettingFee, order:
|
|
49
|
+
calculateFee(companyFee: IPointOfSaleSettingFee, order: IPointOfSaleOrder, orderAmount: number): ICalculateFeeResult;
|
|
50
50
|
formatSetting(_setting: IPointOfSaleSetting): IPointOfSaleSetting;
|
|
51
|
-
customerText(form:
|
|
51
|
+
customerText(form: IPointOfSaleOrder): string;
|
|
52
52
|
isMandatory(orderType: EnumOrderType, value: EnumCustomerMandatory): boolean;
|
|
53
53
|
private round;
|
|
54
54
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import EnumOrderType from "../enums/EnumOrderType";
|
|
2
2
|
import EnumDiscountType from "../enums/EnumDiscountType";
|
|
3
|
-
import { initOrder } from "../interfaces/
|
|
3
|
+
import { initOrder } from "../interfaces/pos/IPointOfSaleOrder";
|
|
4
4
|
import EnumTipType from "../enums/EnumTipType";
|
|
5
5
|
import EnumPaymentType from "../enums/EnumPaymentType";
|
|
6
6
|
import MoneyController from "../controllers/MoneyController";
|
|
@@ -4,20 +4,20 @@ import ISelectedExtraItem from "../interfaces/ISelectedExtraItem";
|
|
|
4
4
|
import ISelectedProductExtra from "../interfaces/ISelectedProductExtra";
|
|
5
5
|
import ITextValue from "../interfaces/ITextValue";
|
|
6
6
|
import TBaseExtra from "../types/TBaseExtra";
|
|
7
|
-
import
|
|
7
|
+
import IPointOfSaleOrderItem from "../interfaces/pos/IPointOfSaleOrderItem";
|
|
8
8
|
import IProduct from "../interfaces/IProduct";
|
|
9
9
|
import IDProductExtra from "../interfaces/database/IDProductExtra";
|
|
10
10
|
import IExtraItem from "../interfaces/IExtraItem";
|
|
11
11
|
declare const _default: {
|
|
12
12
|
getExtraSelectedItems(list: ISelectedProductExtra[], extraId: number): ISelectedExtraItem[];
|
|
13
13
|
canAddToBasket(product: IProduct, selected: ISelectedProductExtra[], extras: IExtra[]): boolean;
|
|
14
|
-
productModalToBasketItem(product: IProduct, selectedExtraList: ISelectedProductExtra[], extras: IExtra[], count: number, price: number, note: string):
|
|
14
|
+
productModalToBasketItem(product: IProduct, selectedExtraList: ISelectedProductExtra[], extras: IExtra[], count: number, price: number, note: string): IPointOfSaleOrderItem;
|
|
15
15
|
productName(product: IProduct): string;
|
|
16
16
|
productImage(product: IProduct): string;
|
|
17
17
|
productPrice(product: IProduct, orderType: EnumOrderType): number;
|
|
18
18
|
baseItem(list: ISelectedProductExtra[], extraList: IExtra[]): TBaseExtra;
|
|
19
19
|
defaultExtraOfProductToSelectedExtras(product: IProduct, extras: IExtra[]): ISelectedProductExtra[];
|
|
20
|
-
defaultExtraOfProductToBasketItem(product: IProduct, extras: IExtra[], orderType: EnumOrderType):
|
|
20
|
+
defaultExtraOfProductToBasketItem(product: IProduct, extras: IExtra[], orderType: EnumOrderType): IPointOfSaleOrderItem;
|
|
21
21
|
singleSelectExtraItemPrice: (extra: IExtra, base: TBaseExtra, item: IExtraItem) => number;
|
|
22
22
|
multiSelectExtraPrice: (extra: IExtra, base: TBaseExtra, item: IExtraItem, selectedList?: ISelectedExtraItem[]) => number;
|
|
23
23
|
multiSelectExtraItemOptions(item: IExtraItem, max: number, selectedList: ISelectedExtraItem[]): ITextValue[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import EnumOrderState from "../enums/EnumOrderState";
|
|
2
2
|
import EnumGender from "../enums/EnumGender";
|
|
3
3
|
import EnumOrderType from "../enums/EnumOrderType";
|
|
4
|
-
import { initOrder } from "./
|
|
4
|
+
import { initOrder } from "./pos/IPointOfSaleOrder";
|
|
5
5
|
export const initKitchenOrderDetail = {
|
|
6
6
|
id: initOrder.id,
|
|
7
7
|
number: 0,
|
|
@@ -2,7 +2,7 @@ import IAccount from "./IAccount";
|
|
|
2
2
|
import IGeneralInformation from "./IGeneralInformation";
|
|
3
3
|
import ISystem from "./ISystem";
|
|
4
4
|
import ISetting from "./ISetting";
|
|
5
|
-
import
|
|
5
|
+
import IPointOfSaleOrder from "./pos/IPointOfSaleOrder";
|
|
6
6
|
import IOnlineOrderItem from "./IOnlineOrderItem";
|
|
7
7
|
import ICategory from "./ICategory";
|
|
8
8
|
import ICustomer from "./ICustomer";
|
|
@@ -21,16 +21,16 @@ import IExtra from "./IExtra";
|
|
|
21
21
|
import IProduct from "./IProduct";
|
|
22
22
|
interface IStore {
|
|
23
23
|
account: IAccount;
|
|
24
|
-
order:
|
|
24
|
+
order: IPointOfSaleOrder;
|
|
25
25
|
general: IGeneralInformation;
|
|
26
26
|
system: ISystem;
|
|
27
27
|
setting: ISetting;
|
|
28
28
|
onlineOrders: IOnlineOrderItem[];
|
|
29
|
-
localOrders:
|
|
29
|
+
localOrders: IPointOfSaleOrder[];
|
|
30
30
|
products: IProduct[];
|
|
31
31
|
categories: ICategory[];
|
|
32
32
|
extras: IExtra[];
|
|
33
|
-
orders:
|
|
33
|
+
orders: IPointOfSaleOrder[];
|
|
34
34
|
customers: ICustomer[];
|
|
35
35
|
isConnected: boolean;
|
|
36
36
|
printTemplates: IPrintTemplate[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import IPointOfSaleOrder from "./pos/IPointOfSaleOrder";
|
|
2
2
|
interface IUdpPacket {
|
|
3
3
|
client: string;
|
|
4
|
-
data:
|
|
4
|
+
data: IPointOfSaleOrder;
|
|
5
5
|
}
|
|
6
6
|
export default IUdpPacket;
|
|
7
7
|
export declare const initUdpPacket: IUdpPacket;
|
|
@@ -5,7 +5,7 @@ import IExtra from "../IExtra";
|
|
|
5
5
|
import IGeneralInformation from "../IGeneralInformation";
|
|
6
6
|
import IGeneralItems from "../IGeneralItems";
|
|
7
7
|
import IOrderState from "../IOrderState";
|
|
8
|
-
import IPointOfSaleSetting from "
|
|
8
|
+
import IPointOfSaleSetting from "./IPointOfSaleSetting";
|
|
9
9
|
import IPrintTemplate from "../IPrintTemplate";
|
|
10
10
|
import IProduct from "../IProduct";
|
|
11
11
|
import IStarMicronicPrinter from "../IStarMicronicPrinter";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initGeneralInformation } from "../IGeneralInformation";
|
|
2
2
|
import { initGeneralItems } from "../IGeneralItems";
|
|
3
|
-
import { initPointOfSaleSetting } from "
|
|
3
|
+
import { initPointOfSaleSetting } from "./IPointOfSaleSetting";
|
|
4
4
|
import { initPointOfSaleLocalSetting } from "./IPointOfSaleLocalSetting";
|
|
5
5
|
export const initApiShop = {
|
|
6
6
|
ok: false,
|
|
@@ -2,16 +2,16 @@ import EnumDiscountType from "../../enums/EnumDiscountType";
|
|
|
2
2
|
import EnumGender from "../../enums/EnumGender";
|
|
3
3
|
import EnumOrderType from "../../enums/EnumOrderType";
|
|
4
4
|
import EnumTipType from "../../enums/EnumTipType";
|
|
5
|
-
import
|
|
5
|
+
import IPointOfSaleOrderItem from "./IPointOfSaleOrderItem";
|
|
6
6
|
import EnumPaymentType from "../../enums/EnumPaymentType";
|
|
7
7
|
import TOrderPayStatus from "../../types/TOrderPayStatus";
|
|
8
8
|
import EnumPaymentState from "../../enums/EnumPaymentState";
|
|
9
9
|
import ICalculateFeeResult from "../ICalculateFeeResult";
|
|
10
10
|
import IOrderDetails from "../print/IOrderDetails";
|
|
11
11
|
import EnumPickupInstruction from "../../enums/EnumPickupInstruction";
|
|
12
|
-
import
|
|
13
|
-
import IPointOfSaleElavonTerminalDevice from "
|
|
14
|
-
interface
|
|
12
|
+
import IPointOfSaleOrderPayment from "./IPointOfSaleOrderPayment";
|
|
13
|
+
import IPointOfSaleElavonTerminalDevice from "./IPointOfSaleElavonTerminalDevice";
|
|
14
|
+
interface IPointOfSaleOrder {
|
|
15
15
|
id: number;
|
|
16
16
|
number: number;
|
|
17
17
|
customerId: number | null;
|
|
@@ -39,7 +39,7 @@ interface IOrder {
|
|
|
39
39
|
latitude: number;
|
|
40
40
|
tableNo: string;
|
|
41
41
|
tableId: number | null;
|
|
42
|
-
products:
|
|
42
|
+
products: IPointOfSaleOrderItem[];
|
|
43
43
|
tipType: EnumTipType;
|
|
44
44
|
tip: number;
|
|
45
45
|
discountType: EnumDiscountType;
|
|
@@ -83,9 +83,9 @@ interface IOrder {
|
|
|
83
83
|
openOrder: boolean;
|
|
84
84
|
draftOrder: boolean;
|
|
85
85
|
points: number;
|
|
86
|
-
paymentTransactions:
|
|
86
|
+
paymentTransactions: IPointOfSaleOrderPayment[];
|
|
87
87
|
elavonDevice: IPointOfSaleElavonTerminalDevice;
|
|
88
88
|
elavonTransaction: object | null;
|
|
89
89
|
}
|
|
90
|
-
export default
|
|
91
|
-
export declare const initOrder:
|
|
90
|
+
export default IPointOfSaleOrder;
|
|
91
|
+
export declare const initOrder: IPointOfSaleOrder;
|
|
@@ -6,7 +6,7 @@ import EnumPaymentType from "../../enums/EnumPaymentType";
|
|
|
6
6
|
import { INIT_TERMINAL } from "../../statics";
|
|
7
7
|
import EnumPaymentState from "../../enums/EnumPaymentState";
|
|
8
8
|
import EnumPickupInstruction from "../../enums/EnumPickupInstruction";
|
|
9
|
-
import { initPointOfSaleElavonTerminalDevice } from "
|
|
9
|
+
import { initPointOfSaleElavonTerminalDevice } from "./IPointOfSaleElavonTerminalDevice";
|
|
10
10
|
export const initOrder = {
|
|
11
11
|
id: -1,
|
|
12
12
|
number: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface IPointOfSaleOrderExtraItem {
|
|
2
2
|
id: number;
|
|
3
3
|
cartItemId: number;
|
|
4
4
|
extraId: number;
|
|
@@ -13,4 +13,4 @@ interface IOrderExtraItem {
|
|
|
13
13
|
extraItemOptionTitle: string;
|
|
14
14
|
extraItemOptionId: number;
|
|
15
15
|
}
|
|
16
|
-
export default
|
|
16
|
+
export default IPointOfSaleOrderExtraItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface
|
|
1
|
+
import IPointOfSaleOrderExtraItem from "./IPointOfSaleOrderExtraItem";
|
|
2
|
+
interface IPointOfSaleOrderItem {
|
|
3
3
|
id: number;
|
|
4
4
|
categoryId: number;
|
|
5
5
|
productId: number;
|
|
@@ -7,7 +7,7 @@ interface IOrderItem {
|
|
|
7
7
|
quantity: number;
|
|
8
8
|
price: number;
|
|
9
9
|
note: string;
|
|
10
|
-
extras:
|
|
10
|
+
extras: IPointOfSaleOrderExtraItem[];
|
|
11
11
|
extrasNames: string;
|
|
12
12
|
totalAmount: number;
|
|
13
13
|
minOrderQuantity: number;
|
|
@@ -21,4 +21,4 @@ interface IOrderItem {
|
|
|
21
21
|
stampCardBonusItem: boolean;
|
|
22
22
|
taxable: boolean | null;
|
|
23
23
|
}
|
|
24
|
-
export default
|
|
24
|
+
export default IPointOfSaleOrderItem;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import IPointOfSaleOrderPayment from "./IPointOfSaleOrderPayment";
|
|
2
2
|
import IPointOfSaleRefundFormItem from "./IPointOfSaleRefundFormItem";
|
|
3
3
|
export default interface IPointOfSaleRefundForm {
|
|
4
4
|
tip: number;
|
|
5
5
|
items: IPointOfSaleRefundFormItem[];
|
|
6
6
|
moneyToBeReturned: number;
|
|
7
|
-
paymentTransactions:
|
|
7
|
+
paymentTransactions: IPointOfSaleOrderPayment[];
|
|
8
8
|
}
|
|
9
9
|
export declare const initPointOfSaleRefundForm: IPointOfSaleRefundForm;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ICalculateFeeResult from "../ICalculateFeeResult";
|
|
2
2
|
import ITextValue from "../ITextValue";
|
|
3
|
-
import
|
|
3
|
+
import IPointOfSaleOrderPayment from "./IPointOfSaleOrderPayment";
|
|
4
4
|
import IPointOfSaleSaveOrderCustomer from "./IPointOfSaleSaveOrderCustomer";
|
|
5
5
|
import IPointOfSaleSaveOrderDiscount from "./IPointOfSaleSaveOrderDiscount";
|
|
6
6
|
import IPointOfSaleSaveOrderProduct from "./IPointOfSaleSaveOrderProduct";
|
|
@@ -45,6 +45,6 @@ export default interface IPointOfSaleSaveOrder {
|
|
|
45
45
|
openOrder: boolean;
|
|
46
46
|
draftOrder: boolean;
|
|
47
47
|
points: number;
|
|
48
|
-
paymentTransactions:
|
|
48
|
+
paymentTransactions: IPointOfSaleOrderPayment[] | null;
|
|
49
49
|
paymentMetaData: ITextValue[];
|
|
50
50
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import EnumCustomerMandatory from "
|
|
2
|
-
import EnumPrintCommand from "
|
|
1
|
+
import EnumCustomerMandatory from "../../enums/EnumCustomerMandatory";
|
|
2
|
+
import EnumPrintCommand from "../../enums/EnumPrintCommand";
|
|
3
3
|
import IPointOfSaleSettingFee from "./IPointOfSaleSettingFee";
|
|
4
4
|
import IPointOfSaleSettingPrintsOnNewOrder from "./IPointOfSaleSettingPrintsOnNewOrder";
|
|
5
|
-
import ITextValue from "
|
|
6
|
-
import IPointOfSaleSettingCashDrawerTrigger from "./
|
|
7
|
-
import IPointOfSaleSettingReceiptCopiesOnOrderPayment from "./
|
|
8
|
-
import IPointOfSaleSettingReceiptCopiesOnOrderSave from "./
|
|
9
|
-
import IPointOfSaleSettingRewardProgram from "./
|
|
10
|
-
import IPointOfSaleSettingTemplateReceipt from "./
|
|
5
|
+
import ITextValue from "../ITextValue";
|
|
6
|
+
import IPointOfSaleSettingCashDrawerTrigger from "./IPointOfSaleSettingCashDrawerTrigger";
|
|
7
|
+
import IPointOfSaleSettingReceiptCopiesOnOrderPayment from "./IPointOfSaleSettingReceiptCopiesOnOrderPayment";
|
|
8
|
+
import IPointOfSaleSettingReceiptCopiesOnOrderSave from "./IPointOfSaleSettingReceiptCopiesOnOrderSave";
|
|
9
|
+
import IPointOfSaleSettingRewardProgram from "./IPointOfSaleSettingRewardProgram";
|
|
10
|
+
import IPointOfSaleSettingTemplateReceipt from "./IPointOfSaleSettingTemplateReceipt";
|
|
11
11
|
export default interface IPointOfSaleSetting {
|
|
12
12
|
sendOrderNotificationViaSMSToCustomer: boolean;
|
|
13
13
|
sendOrderNotificationViaEmailToCustomer: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import EnumCustomerMandatory from "
|
|
2
|
-
import EnumOrderType from "
|
|
3
|
-
import EnumPaymentType from "
|
|
4
|
-
import EnumPrintCommand from "
|
|
5
|
-
import { initPointOfSaleSettingCashDrawerTrigger } from "./
|
|
6
|
-
import { initPointOfSaleSettingReceiptCopiesOnOrderPayment } from "./
|
|
7
|
-
import { initPointOfSaleSettingReceiptCopiesOnOrderSave } from "./
|
|
8
|
-
import { initPointOfSaleSettingRewardProgram } from "./
|
|
9
|
-
import { initPointOfSaleSettingTemplateReceipt } from "./
|
|
1
|
+
import EnumCustomerMandatory from "../../enums/EnumCustomerMandatory";
|
|
2
|
+
import EnumOrderType from "../../enums/EnumOrderType";
|
|
3
|
+
import EnumPaymentType from "../../enums/EnumPaymentType";
|
|
4
|
+
import EnumPrintCommand from "../../enums/EnumPrintCommand";
|
|
5
|
+
import { initPointOfSaleSettingCashDrawerTrigger } from "./IPointOfSaleSettingCashDrawerTrigger";
|
|
6
|
+
import { initPointOfSaleSettingReceiptCopiesOnOrderPayment } from "./IPointOfSaleSettingReceiptCopiesOnOrderPayment";
|
|
7
|
+
import { initPointOfSaleSettingReceiptCopiesOnOrderSave } from "./IPointOfSaleSettingReceiptCopiesOnOrderSave";
|
|
8
|
+
import { initPointOfSaleSettingRewardProgram } from "./IPointOfSaleSettingRewardProgram";
|
|
9
|
+
import { initPointOfSaleSettingTemplateReceipt } from "./IPointOfSaleSettingTemplateReceipt";
|
|
10
10
|
export const initPointOfSaleSetting = {
|
|
11
11
|
sendOrderNotificationViaSMSToCustomer: false,
|
|
12
12
|
sendOrderNotificationViaEmailToCustomer: false,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import IAccount from "../IAccount";
|
|
2
|
+
import IPointOfSaleLocalSetting from "./IPointOfSaleLocalSetting";
|
|
3
|
+
import IPaymentStatusChanged from "../IPaymentStatusChanged";
|
|
4
|
+
import IStarMicronicPrintTask from "../IStarMicronicPrintTask";
|
|
5
|
+
import IWorkScreen from "../IWorkScreen";
|
|
6
|
+
import IPointOfSaleOrder from "./IPointOfSaleOrder";
|
|
7
|
+
import ICancelRequest from "../ICancelRequest";
|
|
8
|
+
import IPointOfSaleOrderSummary from "./IPointOfSaleOrderSummary";
|
|
9
|
+
import IPointOfSaleTask from "./IPointOfSaleTask";
|
|
10
|
+
import IPointOfSaleSetting from "./IPointOfSaleSetting";
|
|
11
|
+
import IPointOfSaleDeviceStatus from "./IPointOfSaleDeviceStatus";
|
|
12
|
+
interface IPointOfSaleStore {
|
|
13
|
+
account: IAccount;
|
|
14
|
+
order: IPointOfSaleOrder;
|
|
15
|
+
onlineOrders: IPointOfSaleOrderSummary[];
|
|
16
|
+
cancelRequests: ICancelRequest[];
|
|
17
|
+
localOrders: IPointOfSaleOrder[];
|
|
18
|
+
isConnected: boolean;
|
|
19
|
+
starMicronicTasks: IStarMicronicPrintTask[];
|
|
20
|
+
localSetting: IPointOfSaleLocalSetting;
|
|
21
|
+
setting: IPointOfSaleSetting;
|
|
22
|
+
customPayment: IPaymentStatusChanged;
|
|
23
|
+
workScreen: IWorkScreen;
|
|
24
|
+
deviceStatus: IPointOfSaleDeviceStatus;
|
|
25
|
+
tasks: IPointOfSaleTask[];
|
|
26
|
+
}
|
|
27
|
+
export default IPointOfSaleStore;
|
|
@@ -8,7 +8,7 @@ import IOrderDetailPaymentInfo from "./IOrderDetailPaymentInfo";
|
|
|
8
8
|
import IModifiedDetails from "./IModifiedDetails";
|
|
9
9
|
import IOrderDetailTimeLine from "./IOrderDetailTimeLine";
|
|
10
10
|
import IOrderDetailThirdPartyDriver from "./IOrderDetailThirdPartyDriver";
|
|
11
|
-
import
|
|
11
|
+
import IPointOfSaleOrderPayment from "../pos/IPointOfSaleOrderPayment";
|
|
12
12
|
interface IOrderDetails {
|
|
13
13
|
order: IOrderDetailOrder;
|
|
14
14
|
customer: IOrderDetailCustomer;
|
|
@@ -24,7 +24,7 @@ interface IOrderDetails {
|
|
|
24
24
|
timeline: IOrderDetailTimeLine[];
|
|
25
25
|
deliveryTrackingUrl: string;
|
|
26
26
|
thirdPartyDriver: IOrderDetailThirdPartyDriver | null;
|
|
27
|
-
paymentTransactions:
|
|
27
|
+
paymentTransactions: IPointOfSaleOrderPayment[];
|
|
28
28
|
}
|
|
29
29
|
export default IOrderDetails;
|
|
30
30
|
export declare const initOrderDetails: IOrderDetails;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.48",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"remove:one": "rimraf dist",
|
|
12
12
|
"remove:two": "rimraf ./src/dist",
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"commit": "git add . && git commit -m \"version.1.3.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.3.48 \" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import IAccount from "./IAccount";
|
|
2
|
-
import IPointOfSaleLocalSetting from "./pos/IPointOfSaleLocalSetting";
|
|
3
|
-
import IPaymentStatusChanged from "./IPaymentStatusChanged";
|
|
4
|
-
import IStarMicronicPrintTask from "./IStarMicronicPrintTask";
|
|
5
|
-
import IWorkScreen from "./IWorkScreen";
|
|
6
|
-
import IOrder from "./order/IOrder";
|
|
7
|
-
import ICancelRequest from "./ICancelRequest";
|
|
8
|
-
import IPointOfSaleOrderSummary from "./pos/IPointOfSaleOrderSummary";
|
|
9
|
-
import IPointOfSaleTask from "./pos/IPointOfSaleTask";
|
|
10
|
-
import IPointOfSaleSetting from "./IPointOfSaleSetting";
|
|
11
|
-
import IPointOfSaleDeviceStatus from "./pos/IPointOfSaleDeviceStatus";
|
|
12
|
-
interface IPointOfSaleStore {
|
|
13
|
-
account: IAccount;
|
|
14
|
-
order: IOrder;
|
|
15
|
-
onlineOrders: IPointOfSaleOrderSummary[];
|
|
16
|
-
cancelRequests: ICancelRequest[];
|
|
17
|
-
localOrders: IOrder[];
|
|
18
|
-
isConnected: boolean;
|
|
19
|
-
starMicronicTasks: IStarMicronicPrintTask[];
|
|
20
|
-
localSetting: IPointOfSaleLocalSetting;
|
|
21
|
-
setting: IPointOfSaleSetting;
|
|
22
|
-
customPayment: IPaymentStatusChanged;
|
|
23
|
-
workScreen: IWorkScreen;
|
|
24
|
-
deviceStatus: IPointOfSaleDeviceStatus;
|
|
25
|
-
tasks: IPointOfSaleTask[];
|
|
26
|
-
}
|
|
27
|
-
export default IPointOfSaleStore;
|
|
File without changes
|
|
File without changes
|
/package/dist/interfaces/{IPointOfSalePreviousOrderItemExtra.js → pos/IPointOfSaleOrderPayment.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/interfaces/{IPointOfSalePreviousOrder.d.ts → pos/IPointOfSalePreviousOrder.d.ts}
RENAMED
|
File without changes
|
/package/dist/interfaces/{IPointOfSaleSettingPrintsOnNewOrder.js → pos/IPointOfSalePreviousOrder.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/interfaces/{order/IOrderExtraItem.js → pos/IPointOfSalePreviousOrderItemExtra.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/interfaces/{order/IOrderPayment.js → pos/IPointOfSaleSettingPrintsOnNewOrder.js}
RENAMED
|
File without changes
|
|
File without changes
|