awing-library 2.1.83-beta → 2.1.84-beta
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.
|
@@ -118,7 +118,7 @@ var RowAdvanceComponent = function (_a) {
|
|
|
118
118
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { className: "".concat((groupNames === null || groupNames === void 0 ? void 0 : groupNames.length) === 0
|
|
119
119
|
? classes.styledNormalRow
|
|
120
120
|
: styledRow(priorityGroupLevel), " ").concat(classes.styledCommonRow), onClick: handleOnClick, children: headCells === null || headCells === void 0 ? void 0 : headCells.map(function (item, index) {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
121
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
122
122
|
switch (item.name) {
|
|
123
123
|
case Enum_1.HEAD_CELL_NAMES.CONTROL:
|
|
124
124
|
return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", colSpan: colSpanFirstCell, className: item.id === Enum_1.HEAD_CELL_IDS.CONTROL
|
|
@@ -134,7 +134,10 @@ var RowAdvanceComponent = function (_a) {
|
|
|
134
134
|
groupNames
|
|
135
135
|
.slice(0, priorityGroupLevel - 1)
|
|
136
136
|
.indexOf(Enum_1.HEAD_CELL_NAMES.PLACE) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: ((_b = options === null || options === void 0 ? void 0 : options.places[row === null || row === void 0 ? void 0 : row.placeId]) === null || _b === void 0 ? void 0 : _b.name) ||
|
|
137
|
-
(row === null || row === void 0 ? void 0 : row.totalPlace)
|
|
137
|
+
((row === null || row === void 0 ? void 0 : row.totalPlace) !==
|
|
138
|
+
0
|
|
139
|
+
? row === null || row === void 0 ? void 0 : row.totalPlace
|
|
140
|
+
: '') })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
138
141
|
case Enum_1.HEAD_CELL_NAMES.CAMPAIGN:
|
|
139
142
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
140
143
|
Enum_1.HEAD_CELL_NAMES.CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: (0, jsx_runtime_1.jsx)(CampaignLabel, { campaignId: row === null || row === void 0 ? void 0 : row.groupKeyId, campaigns: options === null || options === void 0 ? void 0 : options.campaigns, classes: classes }) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
|
|
@@ -165,25 +168,52 @@ var RowAdvanceComponent = function (_a) {
|
|
|
165
168
|
return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: ctr }, item.id));
|
|
166
169
|
case Enum_1.HEAD_CELL_NAMES.CAMPAIGN_CAMPAIGN:
|
|
167
170
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
168
|
-
Enum_1.HEAD_CELL_NAMES.CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: (_e = row === null || row === void 0 ? void 0 : row.campaign) === null || _e === void 0 ? void 0 : _e.name
|
|
171
|
+
Enum_1.HEAD_CELL_NAMES.CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: ((_e = row === null || row === void 0 ? void 0 : row.campaign) === null || _e === void 0 ? void 0 : _e.name) !== ''
|
|
172
|
+
? (_f = row === null || row === void 0 ? void 0 : row.campaign) === null || _f === void 0 ? void 0 : _f.name
|
|
173
|
+
: ((_g = row === null || row === void 0 ? void 0 : row.campaign) === null || _g === void 0 ? void 0 : _g.campaignId) !==
|
|
174
|
+
'0'
|
|
175
|
+
? (_h = row === null || row === void 0 ? void 0 : row.campaign) === null || _h === void 0 ? void 0 : _h.campaignId
|
|
176
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
|
|
169
177
|
.slice(0, priorityGroupLevel - 1)
|
|
170
|
-
.indexOf(Enum_1.HEAD_CELL_NAMES.
|
|
171
|
-
(0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: (
|
|
178
|
+
.indexOf(Enum_1.HEAD_CELL_NAMES.CAMPAIGN_CAMPAIGN) === -1 ? ( // Nếu fieldGroup có index < thằng groupKeyName hiện tại thì hiển thị total hoac name ngược lại phải thụt đầu dòng
|
|
179
|
+
(0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: ((_j = row === null || row === void 0 ? void 0 : row.campaign) === null || _j === void 0 ? void 0 : _j.name) !== ''
|
|
180
|
+
? (_k = row === null || row === void 0 ? void 0 : row.campaign) === null || _k === void 0 ? void 0 : _k.name
|
|
181
|
+
: ((_l = row === null || row === void 0 ? void 0 : row.campaign) === null || _l === void 0 ? void 0 : _l.campaignId) !==
|
|
182
|
+
'0'
|
|
183
|
+
? (_m = row === null || row === void 0 ? void 0 : row.campaign) === null || _m === void 0 ? void 0 : _m.campaignId
|
|
184
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
172
185
|
case Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN:
|
|
173
186
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
174
|
-
Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: (
|
|
187
|
+
Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: ((_o = row === null || row === void 0 ? void 0 : row.domain) === null || _o === void 0 ? void 0 : _o.name) !== ''
|
|
188
|
+
? (_p = row === null || row === void 0 ? void 0 : row.domain) === null || _p === void 0 ? void 0 : _p.name
|
|
189
|
+
: ((_q = row === null || row === void 0 ? void 0 : row.domain) === null || _q === void 0 ? void 0 : _q.domainId) !== '0'
|
|
190
|
+
? (_r = row === null || row === void 0 ? void 0 : row.domain) === null || _r === void 0 ? void 0 : _r.domainId
|
|
191
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
|
|
175
192
|
.slice(0, priorityGroupLevel - 1)
|
|
176
|
-
.indexOf(Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: (
|
|
193
|
+
.indexOf(Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: ((_s = row === null || row === void 0 ? void 0 : row.domain) === null || _s === void 0 ? void 0 : _s.name) !== ''
|
|
194
|
+
? (_t = row === null || row === void 0 ? void 0 : row.domain) === null || _t === void 0 ? void 0 : _t.name
|
|
195
|
+
: ((_u = row === null || row === void 0 ? void 0 : row.domain) === null || _u === void 0 ? void 0 : _u.domainId) !== '0'
|
|
196
|
+
? (_v = row === null || row === void 0 ? void 0 : row.domain) === null || _v === void 0 ? void 0 : _v.domainId
|
|
197
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
177
198
|
case Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN:
|
|
178
199
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
179
|
-
Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: (
|
|
200
|
+
Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: ((_w = row === null || row === void 0 ? void 0 : row.place) === null || _w === void 0 ? void 0 : _w.name) !== ''
|
|
201
|
+
? (_x = row === null || row === void 0 ? void 0 : row.place) === null || _x === void 0 ? void 0 : _x.name
|
|
202
|
+
: ((_y = row === null || row === void 0 ? void 0 : row.place) === null || _y === void 0 ? void 0 : _y.placeId) !== '0'
|
|
203
|
+
? (_z = row === null || row === void 0 ? void 0 : row.place) === null || _z === void 0 ? void 0 : _z.placeId
|
|
204
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children:
|
|
180
205
|
// Nếu field hiện tại ko phải groupName đang showOn thì 3Th
|
|
181
206
|
// TH1: field nằm trong groupNames nhưng đúng trước fieldNameShowOn hiển thị name
|
|
182
207
|
// TH2: field nằm sau fieldNameShowOn trong groupNames hiển thi total
|
|
183
208
|
// Th3: field ko trong groupNames hiển thị total hoặ thông tin schedule nếu nó là cấp cuối cùng
|
|
184
209
|
groupNames
|
|
185
210
|
.slice(0, priorityGroupLevel - 1)
|
|
186
|
-
.indexOf(Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: (
|
|
211
|
+
.indexOf(Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: ((_0 = row === null || row === void 0 ? void 0 : row.place) === null || _0 === void 0 ? void 0 : _0.name) !== ''
|
|
212
|
+
? (_1 = row === null || row === void 0 ? void 0 : row.place) === null || _1 === void 0 ? void 0 : _1.name
|
|
213
|
+
: ((_2 = row === null || row === void 0 ? void 0 : row.place) === null || _2 === void 0 ? void 0 : _2.placeId) !==
|
|
214
|
+
'0'
|
|
215
|
+
? (_3 = row === null || row === void 0 ? void 0 : row.place) === null || _3 === void 0 ? void 0 : _3.placeId
|
|
216
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
187
217
|
default:
|
|
188
218
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
189
219
|
}
|
|
@@ -93,7 +93,7 @@ function ControlPanel(_a) {
|
|
|
93
93
|
var handleElementInput = function (initialFilters) {
|
|
94
94
|
var updatedElementInputs = [];
|
|
95
95
|
initialFilters.map(function (item, idx) {
|
|
96
|
-
var _a, _b, _c, _d;
|
|
96
|
+
var _a, _b, _c, _d, _e;
|
|
97
97
|
switch (item === null || item === void 0 ? void 0 : item.type) {
|
|
98
98
|
case Enums_1.TYPE_FILTERS.VIEW_BY: {
|
|
99
99
|
var element = __assign({ component: ((0, jsx_runtime_1.jsx)(material_1.TextField, { select: true, fullWidth: true, label: t('Common.ViewBy'), size: "small", onChange: function (e) {
|
|
@@ -124,7 +124,7 @@ function ControlPanel(_a) {
|
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
126
|
case Enums_1.TYPE_FILTERS.DATE_RANGE_PICKER: {
|
|
127
|
-
var element = __assign({ component: ((0, jsx_runtime_1.jsx)(AWING_1.DateRangePicker, __assign({ isShowCalendarInfo: true, label: "".concat(t('Common.StartDate'), " - ").concat(t('Common.EndDate')), initialStartDate: (
|
|
127
|
+
var element = __assign({ component: ((0, jsx_runtime_1.jsx)(AWING_1.DateRangePicker, __assign({ isShowCalendarInfo: (_a = item === null || item === void 0 ? void 0 : item.isShowCalendarInfo) !== null && _a !== void 0 ? _a : true, label: "".concat(t('Common.StartDate'), " - ").concat(t('Common.EndDate')), initialStartDate: (_b = item === null || item === void 0 ? void 0 : item.defaultValue) === null || _b === void 0 ? void 0 : _b.startDate, initialEndDate: (_c = item === null || item === void 0 ? void 0 : item.defaultValue) === null || _c === void 0 ? void 0 : _c.endDate, variant: "outlined", textFieldProps: {
|
|
128
128
|
fullWidth: true,
|
|
129
129
|
className: classes.outlinedInput,
|
|
130
130
|
}, callback: handleChangeDateRange }, ((item === null || item === void 0 ? void 0 : item.isDayBlocked) && {
|
|
@@ -167,7 +167,7 @@ function ControlPanel(_a) {
|
|
|
167
167
|
break;
|
|
168
168
|
}
|
|
169
169
|
case Enums_1.TYPE_FILTERS.NETWORK: {
|
|
170
|
-
var element = __assign({ component: ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { color: "primary", defaultChecked: (
|
|
170
|
+
var element = __assign({ component: ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { color: "primary", defaultChecked: (_d = queryInput === null || queryInput === void 0 ? void 0 : queryInput.isCampaignNetwork) !== null && _d !== void 0 ? _d : true }), label: t('Statistic.Network.Title'), labelPlacement: "start", onChange: function (e) {
|
|
171
171
|
handleChangeQueryInput(item === null || item === void 0 ? void 0 : item.name, e.target.checked);
|
|
172
172
|
} }, idx)), isEnhanced: (item === null || item === void 0 ? void 0 : item.isEnhanced) ? item === null || item === void 0 ? void 0 : item.isEnhanced : false, name: 'isCampaignNetwork' }, item);
|
|
173
173
|
updatedElementInputs.push(element);
|
|
@@ -181,7 +181,7 @@ function ControlPanel(_a) {
|
|
|
181
181
|
break;
|
|
182
182
|
}
|
|
183
183
|
case Enums_1.TYPE_FILTERS.INCLUDE_RESERVED: {
|
|
184
|
-
var element = __assign({ component: ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { color: "primary", defaultChecked: (
|
|
184
|
+
var element = __assign({ component: ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { color: "primary", defaultChecked: (_e = queryInput === null || queryInput === void 0 ? void 0 : queryInput.includeReserved) !== null && _e !== void 0 ? _e : true }), label: t('StatisticSchedulePlan.IncludeCampaignReserved'), labelPlacement: "start", onChange: function (e) {
|
|
185
185
|
handleChangeQueryInput(item === null || item === void 0 ? void 0 : item.name, e.target.checked);
|
|
186
186
|
} }, idx)), isEnhanced: (item === null || item === void 0 ? void 0 : item.isEnhanced) ? item === null || item === void 0 ? void 0 : item.isEnhanced : false, name: 'includeReserved' }, item);
|
|
187
187
|
updatedElementInputs.push(element);
|