awing-library 2.1.92-beta → 2.1.94-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.
|
@@ -46,10 +46,8 @@ var react_i18next_1 = require("react-i18next");
|
|
|
46
46
|
var recoil_1 = require("recoil");
|
|
47
47
|
var AWING_1 = require("../../../AWING");
|
|
48
48
|
var Recoils_1 = require("./Recoils");
|
|
49
|
-
var Hooks_1 = __importDefault(require("../Hooks"));
|
|
50
49
|
var i18n_1 = __importDefault(require("../../../i18n"));
|
|
51
50
|
var Infomation = function () {
|
|
52
|
-
var service = (0, Hooks_1.default)().service;
|
|
53
51
|
var directories = (0, recoil_1.useRecoilValue)(Recoils_1.directoriesState);
|
|
54
52
|
var attributes = (0, recoil_1.useRecoilValue)(Recoils_1.attributesState);
|
|
55
53
|
var _a = (0, recoil_1.useRecoilState)(Recoils_1.campaignState), campaign = _a[0], setCampaign = _a[1];
|
|
@@ -65,12 +63,6 @@ var Infomation = function () {
|
|
|
65
63
|
}
|
|
66
64
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
67
65
|
}, [directories]);
|
|
68
|
-
(0, react_1.useEffect)(function () {
|
|
69
|
-
if (!service.attributesGetByObjectTypeCode) {
|
|
70
|
-
setCampaignAttributes([""]);
|
|
71
|
-
}
|
|
72
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
73
|
-
}, [service]);
|
|
74
66
|
var handleUpdate = (0, react_1.useCallback)(function (obj, formValid, fieldUpdate) {
|
|
75
67
|
if (fieldUpdate) {
|
|
76
68
|
if (fieldUpdate === 'attributeIds') {
|
|
@@ -76,6 +76,12 @@ var CreateOrEdit = function () {
|
|
|
76
76
|
? Constant_1.Constants.CAMPAIGN_CLONE
|
|
77
77
|
: Constant_1.Constants.CAMPAIGN_CREATE;
|
|
78
78
|
}, [location.pathname, campaignId]);
|
|
79
|
+
(0, react_1.useEffect)(function () {
|
|
80
|
+
if (!service.attributesGetByObjectTypeCode && !campaignData.campaignAttributes.length) {
|
|
81
|
+
setCampaignData(function (prev) { return (__assign(__assign({}, prev), { campaignAttributes: [""] })); });
|
|
82
|
+
}
|
|
83
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
84
|
+
}, [service, campaignData.campaignAttributes]);
|
|
79
85
|
(0, react_1.useEffect)(function () {
|
|
80
86
|
setLoading(true);
|
|
81
87
|
Promise.all([getCampaignData(), getPage()]).finally(function () {
|
|
@@ -131,6 +131,14 @@ export type CampaignAd = {
|
|
|
131
131
|
name: string;
|
|
132
132
|
domainId: string;
|
|
133
133
|
}[];
|
|
134
|
+
/**
|
|
135
|
+
* Danh sách địa điểm Đã xoá theo điều kiện lọc (thông tin dùng cho việc hiển thị)
|
|
136
|
+
*/
|
|
137
|
+
deletedPlaces?: {
|
|
138
|
+
placeId: string;
|
|
139
|
+
name: string;
|
|
140
|
+
domainId: string;
|
|
141
|
+
}[];
|
|
134
142
|
/**
|
|
135
143
|
* Đánh dấu quảng cáo không được xoá
|
|
136
144
|
*/
|