@plusscommunities/pluss-core-web 1.6.13-beta.0 → 1.6.15-beta.0
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/package.json +1 -2
- package/rollup.config.js +45 -45
- package/src/actions/AuthActions.js +40 -40
- package/src/actions/LocalActions.js +5 -5
- package/src/actions/NavActions.js +5 -5
- package/src/actions/ScheduledActionsActions.js +5 -5
- package/src/actions/TemplateActions.js +9 -9
- package/src/actions/UsersActions.js +74 -70
- package/src/actions/index.js +6 -6
- package/src/actions/types.js +17 -17
- package/src/analytics.js +178 -158
- package/src/apis/analyticsActions.js +50 -50
- package/src/apis/authActions.js +55 -55
- package/src/apis/fileActions.js +147 -142
- package/src/apis/index.js +10 -10
- package/src/apis/profileActions.js +130 -130
- package/src/apis/scheduledActionsActions.js +9 -9
- package/src/apis/stringActions.js +26 -22
- package/src/apis/templateActions.js +38 -38
- package/src/apis/typeActions.js +183 -183
- package/src/apis/userActions.js +166 -166
- package/src/apis/utilityActions.js +32 -32
- package/src/colours.js +79 -77
- package/src/components/AddButton.js +29 -20
- package/src/components/AnalyticsFilter.js +136 -102
- package/src/components/Attachment.js +36 -22
- package/src/components/AudienceIncluder.js +209 -165
- package/src/components/AudienceSelector.js +680 -680
- package/src/components/Button.js +79 -56
- package/src/components/CheckBox.js +77 -65
- package/src/components/ColourOptions.js +205 -181
- package/src/components/ColourPicker.js +286 -244
- package/src/components/Comment.js +48 -39
- package/src/components/CommentSection.js +113 -103
- package/src/components/DatePicker.js +298 -255
- package/src/components/DropdownInput.js +236 -215
- package/src/components/DurationInput.js +46 -43
- package/src/components/ExportCsvPopup.js +236 -217
- package/src/components/FileInput.js +359 -346
- package/src/components/GenericInput.js +184 -153
- package/src/components/Header.js +88 -65
- package/src/components/HubSidebar.js +136 -124
- package/src/components/ImageInput.js +1182 -973
- package/src/components/InputGroup.js +20 -13
- package/src/components/MakerPopup.js +285 -278
- package/src/components/MoreMenu.js +21 -17
- package/src/components/OptionsSection.js +86 -74
- package/src/components/OverlayPage.js +61 -61
- package/src/components/OverlayPageBottomButtons.js +38 -38
- package/src/components/OverlayPageContents.js +38 -38
- package/src/components/OverlayPageSection.js +24 -24
- package/src/components/P60Icon.js +38 -33
- package/src/components/PageTitle.js +8 -8
- package/src/components/Popup.js +114 -95
- package/src/components/ProfilePic.js +40 -40
- package/src/components/RadioButton.js +142 -126
- package/src/components/Reactions.js +66 -66
- package/src/components/SVGIcon.js +31 -25
- package/src/components/SideNavItem.js +112 -83
- package/src/components/StatBox.js +54 -44
- package/src/components/StatusButton.js +31 -17
- package/src/components/SuccessPopup.js +61 -48
- package/src/components/Tabs.js +50 -47
- package/src/components/Tag.js +54 -54
- package/src/components/Text.js +18 -14
- package/src/components/TextFormatPopup.js +77 -49
- package/src/components/TimePicker.js +214 -200
- package/src/components/ToggleSwitch.js +60 -0
- package/src/components/UserListing.js +110 -97
- package/src/components/index.js +46 -46
- package/src/components/svg-icons.json +819 -819
- package/src/config.js +22 -22
- package/src/helper/HelpDeskWidget.js +4 -4
- package/src/helper/api/getUrl.js +16 -11
- package/src/helper/api/getUrlParams.js +8 -5
- package/src/helper/api/safeReadParams.js +3 -2
- package/src/helper/auth/getUserFromState.js +4 -4
- package/src/helper/colours/getAppColourFromState.js +10 -5
- package/src/helper/files/canvasImageUploader.js +152 -140
- package/src/helper/files/generateImageName.js +6 -6
- package/src/helper/files/get1400.js +33 -25
- package/src/helper/files/getExtension.js +5 -5
- package/src/helper/files/getFileName.js +9 -9
- package/src/helper/files/getThumb300.js +37 -29
- package/src/helper/files/isVideo.js +3 -3
- package/src/helper/helper.js +59 -56
- package/src/helper/index.js +29 -29
- package/src/helper/site/getMerchantsFromState.js +8 -4
- package/src/helper/site/getSiteLevelFromState.js +29 -29
- package/src/helper/site/getSiteName.js +11 -11
- package/src/helper/site/getSiteNameFromRoles.js +7 -7
- package/src/helper/site/getSiteSettingFromState.js +10 -5
- package/src/helper/storage/readJSONFromStorage.js +5 -5
- package/src/helper/storage/readStorageWithCookie.js +17 -17
- package/src/helper/storage/setLocalStorage.js +1 -1
- package/src/helper/strings/getFirstName.js +5 -5
- package/src/helper/strings/htmlDecode.js +2 -2
- package/src/helper/strings/htmlEncode.js +2 -2
- package/src/helper/strings/isEmail.js +7 -6
- package/src/helper/strings/isUrl.js +7 -7
- package/src/helper/strings/onlyAlphanumeric.js +4 -4
- package/src/helper/strings/randomString.js +6 -6
- package/src/helper/strings/toParagraphed.js +12 -12
- package/src/index.js +22 -11
- package/src/reducers/ScheduledActionsReducer.js +8 -8
- package/src/reducers/TemplatesReducer.js +22 -22
- package/src/reducers/index.js +4 -4
- package/src/session.js +70 -70
- package/src/urls.js +17 -16
- package/dist/index.cjs.js +0 -11623
- package/dist/index.esm.js +0 -11583
- package/dist/index.umd.js +0 -11595
package/src/apis/fileActions.js
CHANGED
|
@@ -1,152 +1,157 @@
|
|
|
1
|
-
import { getCurrentUserSub, authedFunction } from
|
|
2
|
-
import Config from
|
|
3
|
-
import { Storage } from
|
|
4
|
-
import CanvasImageUploader from
|
|
5
|
-
import $ from
|
|
6
|
-
import { generateImageName, randomString, getUrl } from
|
|
1
|
+
import { getCurrentUserSub, authedFunction } from "../session";
|
|
2
|
+
import Config from "../config";
|
|
3
|
+
import { Storage } from "aws-amplify";
|
|
4
|
+
import CanvasImageUploader from "../helper/files/canvasImageUploader";
|
|
5
|
+
import $ from "jquery";
|
|
6
|
+
import { generateImageName, randomString, getUrl } from "../helper";
|
|
7
7
|
|
|
8
8
|
export const fileActions = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
uploadMediaAsync: async (file, filename) => {
|
|
10
|
+
const newFilename = filename.replace(/[^a-z0-9+.]+/gi, "").toLowerCase();
|
|
11
|
+
const userId = await getCurrentUserSub();
|
|
12
|
+
const url = `uploads/users/${userId}/public/${randomString()}/${newFilename}`;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const { baseUploadsUrl, uploadBucket } = Config.env;
|
|
15
|
+
await Storage.put(url, file, { level: "public", bucket: uploadBucket });
|
|
16
|
+
console.log("uploaded file", `${baseUploadsUrl}${url}`);
|
|
17
|
+
return `${baseUploadsUrl}${url}`;
|
|
18
|
+
},
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
// readBase64: async (file) => {
|
|
21
|
+
// return new Promise((resolve, reject) => {
|
|
22
|
+
// var reader = new FileReader();
|
|
23
|
+
// reader.readAsDataURL(file);
|
|
24
|
+
// reader.onload = () => {
|
|
25
|
+
// resolve(reader.result);
|
|
26
|
+
// //resolve(reader.result.split(',')[1]);
|
|
27
|
+
// };
|
|
28
|
+
// reader.onerror = (error) => {
|
|
29
|
+
// reject(error);
|
|
30
|
+
// };
|
|
31
|
+
// });
|
|
32
|
+
// },
|
|
33
|
+
compressImage: (file, maxSize, quality, noCompress) => {
|
|
34
|
+
return new Promise((resolve, reject) => {
|
|
35
|
+
if (noCompress) {
|
|
36
|
+
resolve(file);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
var $canvas = $("<canvas>");
|
|
40
|
+
$canvas.css("display", "none");
|
|
41
|
+
$("body").append($canvas);
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
var canvasUploader = new CanvasImageUploader({
|
|
44
|
+
maxSize: maxSize,
|
|
45
|
+
jpegQuality: quality,
|
|
46
|
+
});
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
canvasUploader.readImageToCanvas(file, $canvas, function () {
|
|
49
|
+
canvasUploader.saveCanvasToImageData($canvas[0]);
|
|
50
|
+
console.log(file);
|
|
51
|
+
resolve(
|
|
52
|
+
fileActions.blobToFile(canvasUploader.getImageData(), file.name),
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
blobToFile: (theBlob, fileName) => {
|
|
58
|
+
const file = new File([theBlob], fileName, { lastModified: new Date() });
|
|
59
|
+
console.log(file);
|
|
60
|
+
return file;
|
|
61
|
+
},
|
|
62
|
+
putCanvas: (canvas, filename) => {
|
|
63
|
+
return new Promise((resolve, reject) => {
|
|
64
|
+
const img = canvas.getTrimmedCanvas().toDataURL("image/png");
|
|
65
|
+
const imageData = Buffer.from(
|
|
66
|
+
img.replace(/^data:image\/\w+;base64,/, ""),
|
|
67
|
+
"base64",
|
|
68
|
+
);
|
|
64
69
|
|
|
65
|
-
|
|
70
|
+
canvas.off();
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
const imgName = generateImageName(filename);
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
74
|
+
Storage.put(`images/${imgName}.png`, imageData, {
|
|
75
|
+
contentType: "image/png",
|
|
76
|
+
level: "public",
|
|
77
|
+
})
|
|
78
|
+
.then((res) => {
|
|
79
|
+
console.log("put the image");
|
|
80
|
+
return resolve(res);
|
|
81
|
+
})
|
|
82
|
+
.catch((err) => {
|
|
83
|
+
return reject(err);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
getMediaFolders: (site) => {
|
|
88
|
+
// console.log('getMediaFolders', 'site', site);
|
|
89
|
+
const query = { site };
|
|
90
|
+
return authedFunction({
|
|
91
|
+
method: "GET",
|
|
92
|
+
url: getUrl("media", "folders", query),
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
addMediaFolder: (site, name, published) => {
|
|
96
|
+
return authedFunction({
|
|
97
|
+
method: "POST",
|
|
98
|
+
url: getUrl("media", "addFolder"),
|
|
99
|
+
data: {
|
|
100
|
+
site,
|
|
101
|
+
name,
|
|
102
|
+
published,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
updateMediaFolder: (id, site, name, published) => {
|
|
107
|
+
// console.log('updateMediaFolder', 'id', id, 'site', site, 'name', name, 'published', published);
|
|
108
|
+
return authedFunction({
|
|
109
|
+
method: "POST",
|
|
110
|
+
url: getUrl("media", "updateFolder"),
|
|
111
|
+
data: {
|
|
112
|
+
id,
|
|
113
|
+
site,
|
|
114
|
+
name,
|
|
115
|
+
published,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
deleteMediaFolder: (id, site) => {
|
|
120
|
+
return authedFunction({
|
|
121
|
+
method: "POST",
|
|
122
|
+
url: getUrl("media", "deleteFolder"),
|
|
123
|
+
data: {
|
|
124
|
+
id,
|
|
125
|
+
site,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
addImagesToFolder: (id, site, images) => {
|
|
130
|
+
return authedFunction({
|
|
131
|
+
method: "POST",
|
|
132
|
+
url: getUrl("media", "addImages"),
|
|
133
|
+
data: {
|
|
134
|
+
id,
|
|
135
|
+
site,
|
|
136
|
+
images,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
deleteImagesFromFolder: (id, site, images) => {
|
|
141
|
+
return authedFunction({
|
|
142
|
+
method: "POST",
|
|
143
|
+
url: getUrl("media", "deleteImages"),
|
|
144
|
+
data: {
|
|
145
|
+
id,
|
|
146
|
+
site,
|
|
147
|
+
images,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
getMediaLibrary: () => {
|
|
152
|
+
return authedFunction({
|
|
153
|
+
method: "GET",
|
|
154
|
+
url: "https://pluss60.pluss60-api.com/media-demo/library",
|
|
155
|
+
});
|
|
156
|
+
},
|
|
152
157
|
};
|
package/src/apis/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
1
|
+
export * from "./analyticsActions";
|
|
2
|
+
export * from "./authActions";
|
|
3
|
+
export * from "./fileActions";
|
|
4
|
+
export * from "./typeActions";
|
|
5
|
+
export * from "./stringActions";
|
|
6
|
+
export * from "./userActions";
|
|
7
|
+
export * from "./profileActions";
|
|
8
|
+
export * from "./utilityActions";
|
|
9
|
+
export * from "./templateActions";
|
|
10
|
+
export * from "./scheduledActionsActions";
|
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
import { authedFunction } from
|
|
2
|
-
import { getUrl } from
|
|
1
|
+
import { authedFunction } from "../session";
|
|
2
|
+
import { getUrl } from "../helper";
|
|
3
3
|
|
|
4
4
|
export const profileActions = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
5
|
+
addEC: (userId, name, phone, email, relationship) => {
|
|
6
|
+
return authedFunction({
|
|
7
|
+
method: "POST",
|
|
8
|
+
url: getUrl("profile", "emergencycontacts/add"),
|
|
9
|
+
data: { userId, name, phone, email, relationship },
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
editEC: (id, userId, name, phone, email, relationship) => {
|
|
13
|
+
return authedFunction({
|
|
14
|
+
method: "POST",
|
|
15
|
+
url: getUrl("profile", "emergencycontacts/edit"),
|
|
16
|
+
data: { id, userId, name, phone, email, relationship },
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
deleteEC: (id) => {
|
|
20
|
+
return authedFunction({
|
|
21
|
+
method: "POST",
|
|
22
|
+
url: getUrl("profile", "emergencycontacts/delete"),
|
|
23
|
+
data: { id },
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
getECs: (userId) => {
|
|
27
|
+
return authedFunction({
|
|
28
|
+
method: "GET",
|
|
29
|
+
url: getUrl("profile", "emergencycontacts/user", { userId }),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
addPD: (userId, name, url, isPublic) => {
|
|
33
|
+
return authedFunction({
|
|
34
|
+
method: "POST",
|
|
35
|
+
url: getUrl("profile", "personaldocuments/add"),
|
|
36
|
+
data: { userId, name, url, isPublic },
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
editPD: (id, userId, name, url, isPublic) => {
|
|
40
|
+
return authedFunction({
|
|
41
|
+
method: "POST",
|
|
42
|
+
url: getUrl("profile", "personaldocuments/edit"),
|
|
43
|
+
data: { id, userId, name, url, isPublic },
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
deletePD: (id) => {
|
|
47
|
+
return authedFunction({
|
|
48
|
+
method: "POST",
|
|
49
|
+
url: getUrl("profile", "personaldocuments/delete"),
|
|
50
|
+
data: { id },
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
getPDs: (userId) => {
|
|
54
|
+
return authedFunction({
|
|
55
|
+
method: "GET",
|
|
56
|
+
url: getUrl("profile", "personaldocuments/user", { userId }),
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
addPN: (userId, title, text, attachments) => {
|
|
60
|
+
return authedFunction({
|
|
61
|
+
method: "POST",
|
|
62
|
+
url: getUrl("profile", "personalnotes/add"),
|
|
63
|
+
data: { userId, title, text, attachments },
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
editPN: (id, title, text, attachments) => {
|
|
67
|
+
return authedFunction({
|
|
68
|
+
method: "POST",
|
|
69
|
+
url: getUrl("profile", "personalnotes/edit"),
|
|
70
|
+
data: { id, title, text, attachments },
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
deletePN: (id) => {
|
|
74
|
+
return authedFunction({
|
|
75
|
+
method: "POST",
|
|
76
|
+
url: getUrl("profile", "personalnotes/delete"),
|
|
77
|
+
data: { id },
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
getPNs: (userId) => {
|
|
81
|
+
return authedFunction({
|
|
82
|
+
method: "GET",
|
|
83
|
+
url: getUrl("profile", "personalnotes/user", { userId }),
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
addUserTag: (site, title) => {
|
|
87
|
+
return authedFunction({
|
|
88
|
+
method: "POST",
|
|
89
|
+
url: getUrl("profile", "usertags/add"),
|
|
90
|
+
data: { site, title },
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
editUserTag: (id, title) => {
|
|
94
|
+
return authedFunction({
|
|
95
|
+
method: "POST",
|
|
96
|
+
url: getUrl("profile", "usertags/edit"),
|
|
97
|
+
data: { id, title },
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
deleteUserTag: (id) => {
|
|
101
|
+
return authedFunction({
|
|
102
|
+
method: "POST",
|
|
103
|
+
url: getUrl("profile", "usertags/delete"),
|
|
104
|
+
data: { id },
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
attachUserTag: (tagId, userId) => {
|
|
108
|
+
return authedFunction({
|
|
109
|
+
method: "POST",
|
|
110
|
+
url: getUrl("profile", "usertags/attach"),
|
|
111
|
+
data: { tagId, userId },
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
detachUserTag: (tagId, userId) => {
|
|
115
|
+
return authedFunction({
|
|
116
|
+
method: "POST",
|
|
117
|
+
url: getUrl("profile", "usertags/detach"),
|
|
118
|
+
data: { tagId, userId },
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
getUserTagsByUser: (userId) => {
|
|
122
|
+
return authedFunction({
|
|
123
|
+
method: "GET",
|
|
124
|
+
url: getUrl("profile", "usertags/user", { userId }),
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
getUserTagsBySite: (site) => {
|
|
128
|
+
return authedFunction({
|
|
129
|
+
method: "GET",
|
|
130
|
+
url: getUrl("profile", "usertags/site", { site }),
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
133
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { getUrl } from
|
|
2
|
-
import { authedFunction } from
|
|
1
|
+
import { getUrl } from "../helper";
|
|
2
|
+
import { authedFunction } from "../session";
|
|
3
3
|
|
|
4
4
|
export const scheduledActionsActions = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
getActions: (site, entityKey) => {
|
|
6
|
+
const query = { site, entityKey };
|
|
7
|
+
return authedFunction({
|
|
8
|
+
method: "GET",
|
|
9
|
+
url: getUrl("scheduledactions", "get/list", query),
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
12
|
};
|