@elxjs/ui 0.0.192 → 0.0.193
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.
|
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
import * as i1 from "@angular/router";
|
|
6
6
|
export class EluxCardRoutine {
|
|
7
7
|
constructor() {
|
|
8
|
-
this.
|
|
8
|
+
this.nextExecutionDate = '';
|
|
9
9
|
}
|
|
10
10
|
formatDate(dateString) {
|
|
11
11
|
if (!dateString) {
|
|
@@ -20,12 +20,12 @@ export class EluxCardRoutine {
|
|
|
20
20
|
}).format(date);
|
|
21
21
|
}
|
|
22
22
|
checkIfIsUpdated() {
|
|
23
|
-
if (!this.
|
|
23
|
+
if (!this.activationDate || this.frequencyInMonths === undefined) {
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
|
-
const comparisonDate = this.
|
|
26
|
+
const comparisonDate = this.lastExecutionDate || this.activationDate.split('T')[0];
|
|
27
27
|
const diffInMonths = this.calculateDifferenceInMonthsWithNow(comparisonDate);
|
|
28
|
-
return diffInMonths <= this.
|
|
28
|
+
return diffInMonths <= this.frequencyInMonths;
|
|
29
29
|
}
|
|
30
30
|
getReminderStatus() {
|
|
31
31
|
return this.checkIfIsUpdated() ? 'Em dia' : 'Em atraso';
|
|
@@ -50,24 +50,24 @@ export class EluxCardRoutine {
|
|
|
50
50
|
return totalMonths;
|
|
51
51
|
}
|
|
52
52
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EluxCardRoutine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EluxCardRoutine, isStandalone: true, selector: "elux-card-routine", inputs: { image: "image",
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EluxCardRoutine, isStandalone: true, selector: "elux-card-routine", inputs: { image: "image", routerLink: "routerLink", title: "title", nextExecutionDate: "nextExecutionDate", lastExecutionDate: "lastExecutionDate", activationDate: "activationDate", frequencyInMonths: "frequencyInMonths" }, ngImport: i0, template: "<a [routerLink]=\"routerLink\">\n <div class=\"elux-card-routine\">\n <div class=\"d-flex align-items-center\">\n <img class=\"image\" [src]=\"image\" alt=\"Product Image\" />\n </div>\n <div class=\"content\">\n <div>\n <span class=\"tag\" [style.background-color]=\"getReminderStatusColor()\">\n {{ getReminderStatus() }}\n </span>\n </div>\n <span class=\"title\">{{ title }}</span>\n <span class=\"caption\">\n Pr\u00F3xima: <strong>{{ formatDate(nextExecutionDate) }}</strong>\n </span>\n </div>\n </div>\n</a>\n", styles: [".display{font-family:Electrolux Sans;font-size:48px;font-weight:700;line-height:56px}.heading-1{font-family:Electrolux Sans;font-size:34px;font-weight:700;line-height:40px}.heading-2{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}@media screen and (max-width: 768px){.display{font-family:Electrolux Sans;font-size:40px;font-weight:700;line-height:46px}.heading-1{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-2{font-family:Electrolux Sans;font-size:24px;font-weight:600;line-height:28px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}}a{text-decoration:none}.elux-card-routine{height:100%;background-color:#fff;border:solid 1px #dee7ea;border-radius:2px;display:flex;flex-direction:row;padding:8px;gap:8px;box-shadow:4px 4px 15px #0000001a}.elux-card-routine .image{width:64px;height:64px}.elux-card-routine .content{display:flex;flex-direction:column;gap:8px}.elux-card-routine .content .tag{padding:2px 8px;border-radius:16px;font-size:12px;line-height:15px;font-weight:400;font-style:normal;color:#fff}.elux-card-routine .content .title{color:#011e41;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.elux-card-routine .content .caption{color:#515253;font-size:14px;font-size:normal;font-weight:400;line-height:21px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
54
54
|
}
|
|
55
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EluxCardRoutine, decorators: [{
|
|
56
56
|
type: Component,
|
|
57
|
-
args: [{ standalone: true, imports: [CommonModule, RouterModule], selector: 'elux-card-routine', template: "<a [routerLink]=\"
|
|
57
|
+
args: [{ standalone: true, imports: [CommonModule, RouterModule], selector: 'elux-card-routine', template: "<a [routerLink]=\"routerLink\">\n <div class=\"elux-card-routine\">\n <div class=\"d-flex align-items-center\">\n <img class=\"image\" [src]=\"image\" alt=\"Product Image\" />\n </div>\n <div class=\"content\">\n <div>\n <span class=\"tag\" [style.background-color]=\"getReminderStatusColor()\">\n {{ getReminderStatus() }}\n </span>\n </div>\n <span class=\"title\">{{ title }}</span>\n <span class=\"caption\">\n Pr\u00F3xima: <strong>{{ formatDate(nextExecutionDate) }}</strong>\n </span>\n </div>\n </div>\n</a>\n", styles: [".display{font-family:Electrolux Sans;font-size:48px;font-weight:700;line-height:56px}.heading-1{font-family:Electrolux Sans;font-size:34px;font-weight:700;line-height:40px}.heading-2{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}@media screen and (max-width: 768px){.display{font-family:Electrolux Sans;font-size:40px;font-weight:700;line-height:46px}.heading-1{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-2{font-family:Electrolux Sans;font-size:24px;font-weight:600;line-height:28px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}}a{text-decoration:none}.elux-card-routine{height:100%;background-color:#fff;border:solid 1px #dee7ea;border-radius:2px;display:flex;flex-direction:row;padding:8px;gap:8px;box-shadow:4px 4px 15px #0000001a}.elux-card-routine .image{width:64px;height:64px}.elux-card-routine .content{display:flex;flex-direction:column;gap:8px}.elux-card-routine .content .tag{padding:2px 8px;border-radius:16px;font-size:12px;line-height:15px;font-weight:400;font-style:normal;color:#fff}.elux-card-routine .content .title{color:#011e41;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.elux-card-routine .content .caption{color:#515253;font-size:14px;font-size:normal;font-weight:400;line-height:21px}\n"] }]
|
|
58
58
|
}], propDecorators: { image: [{
|
|
59
59
|
type: Input
|
|
60
|
-
}],
|
|
60
|
+
}], routerLink: [{
|
|
61
61
|
type: Input
|
|
62
62
|
}], title: [{
|
|
63
63
|
type: Input
|
|
64
|
-
}],
|
|
64
|
+
}], nextExecutionDate: [{
|
|
65
65
|
type: Input
|
|
66
|
-
}],
|
|
66
|
+
}], lastExecutionDate: [{
|
|
67
67
|
type: Input
|
|
68
|
-
}],
|
|
68
|
+
}], activationDate: [{
|
|
69
69
|
type: Input
|
|
70
|
-
}],
|
|
70
|
+
}], frequencyInMonths: [{
|
|
71
71
|
type: Input
|
|
72
72
|
}] } });
|
|
73
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
73
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZC1yb3V0aW5lLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3VpL2xpYnJhcnkvc3JjL2xpYi9jb21wb25lbnRzL2NhcmQtcm91dGluZS9jYXJkLXJvdXRpbmUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vdWkvbGlicmFyeS9zcmMvbGliL2NvbXBvbmVudHMvY2FyZC1yb3V0aW5lL2NhcmQtcm91dGluZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDakQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDOzs7QUFTL0MsTUFBTSxPQUFPLGVBQWU7SUFQNUI7UUFXVyxzQkFBaUIsR0FBVyxFQUFFLENBQUM7S0EwRHpDO0lBckRDLFVBQVUsQ0FBQyxVQUFrQjtRQUMzQixJQUFJLENBQUMsVUFBVSxFQUFFLENBQUM7WUFDaEIsT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vdGFsTW9udGhzO1xuICB9XG59XG4iLCI8YSBbcm91dGVyTGlua109XCJyb3V0ZXJMaW5rXCI+XG4gIDxkaXYgY2xhc3M9XCJlbHV4LWNhcmQtcm91dGluZVwiPlxuICAgIDxkaXYgY2xhc3M9XCJkLWZsZXggYWxpZ24taXRlbXMtY2VudGVyXCI+XG4gICAgICA8aW1nIGNsYXNzPVwiaW1hZ2VcIiBbc3JjXT1cImltYWdlXCIgYWx0PVwiUHJvZHVjdCBJbWFnZVwiIC8+XG4gICAgPC9kaXY+XG4gICAgPGRpdiBjbGFzcz1cImNvbnRlbnRcIj5cbiAgICAgIDxkaXY+XG4gICAgICAgIDxzcGFuIGNsYXNzPVwidGFnXCIgW3N0eWxlLmJhY2tncm91bmQtY29sb3JdPVwiZ2V0UmVtaW5kZXJTdGF0dXNDb2xvcigpXCI+XG4gICAgICAgICAge3sgZ2V0UmVtaW5kZXJTdGF0dXMoKSB9fVxuICAgICAgICA8L3NwYW4+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxzcGFuIGNsYXNzPVwidGl0bGVcIj57eyB0aXRsZSB9fTwvc3Bhbj5cbiAgICAgIDxzcGFuIGNsYXNzPVwiY2FwdGlvblwiPlxuICAgICAgICBQcsOzeGltYTogPHN0cm9uZz57eyBmb3JtYXREYXRlKG5leHRFeGVjdXRpb25EYXRlKSB9fTwvc3Ryb25nPlxuICAgICAgPC9zcGFuPlxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbjwvYT5cbiJdfQ==
|
package/fesm2022/elxjs-ui.mjs
CHANGED
|
@@ -2503,7 +2503,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2503
2503
|
|
|
2504
2504
|
class EluxCardRoutine {
|
|
2505
2505
|
constructor() {
|
|
2506
|
-
this.
|
|
2506
|
+
this.nextExecutionDate = '';
|
|
2507
2507
|
}
|
|
2508
2508
|
formatDate(dateString) {
|
|
2509
2509
|
if (!dateString) {
|
|
@@ -2518,12 +2518,12 @@ class EluxCardRoutine {
|
|
|
2518
2518
|
}).format(date);
|
|
2519
2519
|
}
|
|
2520
2520
|
checkIfIsUpdated() {
|
|
2521
|
-
if (!this.
|
|
2521
|
+
if (!this.activationDate || this.frequencyInMonths === undefined) {
|
|
2522
2522
|
return true;
|
|
2523
2523
|
}
|
|
2524
|
-
const comparisonDate = this.
|
|
2524
|
+
const comparisonDate = this.lastExecutionDate || this.activationDate.split('T')[0];
|
|
2525
2525
|
const diffInMonths = this.calculateDifferenceInMonthsWithNow(comparisonDate);
|
|
2526
|
-
return diffInMonths <= this.
|
|
2526
|
+
return diffInMonths <= this.frequencyInMonths;
|
|
2527
2527
|
}
|
|
2528
2528
|
getReminderStatus() {
|
|
2529
2529
|
return this.checkIfIsUpdated() ? 'Em dia' : 'Em atraso';
|
|
@@ -2548,24 +2548,24 @@ class EluxCardRoutine {
|
|
|
2548
2548
|
return totalMonths;
|
|
2549
2549
|
}
|
|
2550
2550
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EluxCardRoutine, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2551
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EluxCardRoutine, isStandalone: true, selector: "elux-card-routine", inputs: { image: "image",
|
|
2551
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EluxCardRoutine, isStandalone: true, selector: "elux-card-routine", inputs: { image: "image", routerLink: "routerLink", title: "title", nextExecutionDate: "nextExecutionDate", lastExecutionDate: "lastExecutionDate", activationDate: "activationDate", frequencyInMonths: "frequencyInMonths" }, ngImport: i0, template: "<a [routerLink]=\"routerLink\">\n <div class=\"elux-card-routine\">\n <div class=\"d-flex align-items-center\">\n <img class=\"image\" [src]=\"image\" alt=\"Product Image\" />\n </div>\n <div class=\"content\">\n <div>\n <span class=\"tag\" [style.background-color]=\"getReminderStatusColor()\">\n {{ getReminderStatus() }}\n </span>\n </div>\n <span class=\"title\">{{ title }}</span>\n <span class=\"caption\">\n Pr\u00F3xima: <strong>{{ formatDate(nextExecutionDate) }}</strong>\n </span>\n </div>\n </div>\n</a>\n", styles: [".display{font-family:Electrolux Sans;font-size:48px;font-weight:700;line-height:56px}.heading-1{font-family:Electrolux Sans;font-size:34px;font-weight:700;line-height:40px}.heading-2{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}@media screen and (max-width: 768px){.display{font-family:Electrolux Sans;font-size:40px;font-weight:700;line-height:46px}.heading-1{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-2{font-family:Electrolux Sans;font-size:24px;font-weight:600;line-height:28px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}}a{text-decoration:none}.elux-card-routine{height:100%;background-color:#fff;border:solid 1px #dee7ea;border-radius:2px;display:flex;flex-direction:row;padding:8px;gap:8px;box-shadow:4px 4px 15px #0000001a}.elux-card-routine .image{width:64px;height:64px}.elux-card-routine .content{display:flex;flex-direction:column;gap:8px}.elux-card-routine .content .tag{padding:2px 8px;border-radius:16px;font-size:12px;line-height:15px;font-weight:400;font-style:normal;color:#fff}.elux-card-routine .content .title{color:#011e41;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.elux-card-routine .content .caption{color:#515253;font-size:14px;font-size:normal;font-weight:400;line-height:21px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
2552
2552
|
}
|
|
2553
2553
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EluxCardRoutine, decorators: [{
|
|
2554
2554
|
type: Component,
|
|
2555
|
-
args: [{ standalone: true, imports: [CommonModule, RouterModule], selector: 'elux-card-routine', template: "<a [routerLink]=\"
|
|
2555
|
+
args: [{ standalone: true, imports: [CommonModule, RouterModule], selector: 'elux-card-routine', template: "<a [routerLink]=\"routerLink\">\n <div class=\"elux-card-routine\">\n <div class=\"d-flex align-items-center\">\n <img class=\"image\" [src]=\"image\" alt=\"Product Image\" />\n </div>\n <div class=\"content\">\n <div>\n <span class=\"tag\" [style.background-color]=\"getReminderStatusColor()\">\n {{ getReminderStatus() }}\n </span>\n </div>\n <span class=\"title\">{{ title }}</span>\n <span class=\"caption\">\n Pr\u00F3xima: <strong>{{ formatDate(nextExecutionDate) }}</strong>\n </span>\n </div>\n </div>\n</a>\n", styles: [".display{font-family:Electrolux Sans;font-size:48px;font-weight:700;line-height:56px}.heading-1{font-family:Electrolux Sans;font-size:34px;font-weight:700;line-height:40px}.heading-2{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}@media screen and (max-width: 768px){.display{font-family:Electrolux Sans;font-size:40px;font-weight:700;line-height:46px}.heading-1{font-family:Electrolux Sans;font-size:28px;font-weight:600;line-height:32px}.heading-2{font-family:Electrolux Sans;font-size:24px;font-weight:600;line-height:28px}.heading-3{font-family:Electrolux Sans;font-size:20px;font-weight:600;line-height:24px}.subtitle-1{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:20px}.body{font-family:Electrolux Sans;font-size:16px;font-weight:400;line-height:21px}.caption{font-family:Electrolux Sans;font-size:14px;font-weight:400;line-height:normal}.links{font-family:Electrolux Sans;font-size:16px;font-weight:600;line-height:normal;text-decoration-line:underline}}a{text-decoration:none}.elux-card-routine{height:100%;background-color:#fff;border:solid 1px #dee7ea;border-radius:2px;display:flex;flex-direction:row;padding:8px;gap:8px;box-shadow:4px 4px 15px #0000001a}.elux-card-routine .image{width:64px;height:64px}.elux-card-routine .content{display:flex;flex-direction:column;gap:8px}.elux-card-routine .content .tag{padding:2px 8px;border-radius:16px;font-size:12px;line-height:15px;font-weight:400;font-style:normal;color:#fff}.elux-card-routine .content .title{color:#011e41;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.elux-card-routine .content .caption{color:#515253;font-size:14px;font-size:normal;font-weight:400;line-height:21px}\n"] }]
|
|
2556
2556
|
}], propDecorators: { image: [{
|
|
2557
2557
|
type: Input
|
|
2558
|
-
}],
|
|
2558
|
+
}], routerLink: [{
|
|
2559
2559
|
type: Input
|
|
2560
2560
|
}], title: [{
|
|
2561
2561
|
type: Input
|
|
2562
|
-
}],
|
|
2562
|
+
}], nextExecutionDate: [{
|
|
2563
2563
|
type: Input
|
|
2564
|
-
}],
|
|
2564
|
+
}], lastExecutionDate: [{
|
|
2565
2565
|
type: Input
|
|
2566
|
-
}],
|
|
2566
|
+
}], activationDate: [{
|
|
2567
2567
|
type: Input
|
|
2568
|
-
}],
|
|
2568
|
+
}], frequencyInMonths: [{
|
|
2569
2569
|
type: Input
|
|
2570
2570
|
}] } });
|
|
2571
2571
|
|