tek-ms-recap 1.0.9 → 1.0.10
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/Recap/index.d.ts +2 -2
- package/dist/ms-recap.js +4 -4
- package/package.json +1 -1
package/dist/Recap/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface RenderInterfaceRecap {
|
|
|
17
17
|
customers: Customer[];
|
|
18
18
|
onConfirm: (items: RecapItem[], customer: Customer) => void;
|
|
19
19
|
onCancel: (items: RecapItem[]) => void;
|
|
20
|
-
|
|
20
|
+
onSaveCustomer?: (customer: Customer) => void;
|
|
21
21
|
}
|
|
22
22
|
export declare class RecapSheet {
|
|
23
23
|
private el;
|
|
@@ -30,7 +30,7 @@ export declare class RecapSheet {
|
|
|
30
30
|
private selectedCustomer;
|
|
31
31
|
private onConfirm?;
|
|
32
32
|
private onCancel?;
|
|
33
|
-
private
|
|
33
|
+
private onSaveCustomer?;
|
|
34
34
|
constructor(mountPoint: HTMLElement);
|
|
35
35
|
getItems(): RecapItem[];
|
|
36
36
|
setItems(_items: RecapItem[]): void;
|
package/dist/ms-recap.js
CHANGED
|
@@ -28,7 +28,7 @@ var t = [
|
|
|
28
28
|
selectedCustomer = null;
|
|
29
29
|
onConfirm;
|
|
30
30
|
onCancel;
|
|
31
|
-
|
|
31
|
+
onSaveCustomer;
|
|
32
32
|
constructor(e) {
|
|
33
33
|
this.el = e, this.clientOverlayEl = document.createElement("div"), this.clientOverlayEl.id = "recap-client-overlay", document.body.appendChild(this.clientOverlayEl), this.newClientOverlayEl = document.createElement("div"), this.newClientOverlayEl.id = "recap-new-client-overlay", document.body.appendChild(this.newClientOverlayEl);
|
|
34
34
|
}
|
|
@@ -60,7 +60,7 @@ var t = [
|
|
|
60
60
|
return t[n % t.length];
|
|
61
61
|
}
|
|
62
62
|
render(t) {
|
|
63
|
-
this.setItems(t.items), this.customers = t.customers, this.onConfirm = t.onConfirm, this.onCancel = t.onCancel, this.
|
|
63
|
+
this.setItems(t.items), this.customers = t.customers, this.onConfirm = t.onConfirm, this.onCancel = t.onCancel, this.onSaveCustomer = t.onSaveCustomer, this.selectedCustomer = null, this.el.innerHTML = `
|
|
64
64
|
<div class="overlay show" id="recap-overlay">
|
|
65
65
|
<div class="sheet modal-recap" style="max-height:88vh;">
|
|
66
66
|
<div class="sheet-handle"></div>
|
|
@@ -173,7 +173,7 @@ var t = [
|
|
|
173
173
|
}
|
|
174
174
|
selectCustomer(e) {
|
|
175
175
|
let t = this.customers.find((t) => t.phone === e);
|
|
176
|
-
t && (this.selectedCustomer = t, this.renderClientBlock(), this.resetClientSheet()
|
|
176
|
+
t && (this.selectedCustomer = t, this.renderClientBlock(), this.resetClientSheet());
|
|
177
177
|
}
|
|
178
178
|
resetClientSheet() {
|
|
179
179
|
this.clientOverlayEl.innerHTML = "";
|
|
@@ -219,7 +219,7 @@ var t = [
|
|
|
219
219
|
lastname: c,
|
|
220
220
|
phone: l
|
|
221
221
|
};
|
|
222
|
-
u || this.customers.unshift(d), this.selectedCustomer = d, this.renderClientBlock(), this.resetClientOverlay(), this.resetClientSheet(), this.
|
|
222
|
+
u || this.customers.unshift(d), this.selectedCustomer = d, this.renderClientBlock(), this.resetClientOverlay(), this.resetClientSheet(), this.onSaveCustomer?.(d);
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
extractLocalPhoneDigits(e) {
|