@zeniai/client-epic-state 4.10.36 → 4.10.38
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/lib/entity/account/accountSelector.js +4 -2
- package/lib/entity/accountGroup/accountGroupSelector.js +2 -1
- package/lib/entity/company/companyPayload.js +2 -1
- package/lib/entity/customerIncome/customerIncomeTrend.js +2 -1
- package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
- package/lib/entity/paymentAccount/paymentAccountSelector.js +5 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/entity/tag/tagPayload.d.ts +9 -0
- package/lib/entity/tag/tagPayload.js +12 -0
- package/lib/entity/tag/tagReducer.d.ts +9 -0
- package/lib/entity/tag/tagReducer.js +39 -0
- package/lib/entity/tag/tagSelector.d.ts +4 -0
- package/lib/entity/tag/tagSelector.js +18 -0
- package/lib/entity/tag/tagState.d.ts +12 -0
- package/lib/entity/tag/tagState.js +2 -0
- package/lib/entity/task/taskPayload.d.ts +6 -2
- package/lib/entity/task/taskPayload.js +1 -6
- package/lib/entity/task/taskState.d.ts +1 -5
- package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/transaction/payloadTypes/otherTransactionPayload.js +2 -1
- package/lib/entity/user/userSelector.js +4 -2
- package/lib/entity/vendorExpense/vendorExpenseTrend.js +2 -1
- package/lib/epic.d.ts +4 -1
- package/lib/epic.js +4 -1
- package/lib/index.d.ts +10 -5
- package/lib/index.js +24 -16
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/accountMappingView/saveAccountMappingViewEpic.js +2 -1
- package/lib/view/autoComplete/fetchEntityAutoCompleteEpic.js +2 -1
- package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.js +8 -4
- package/lib/view/companyView/selector/companyManagementViewSelector.js +58 -29
- package/lib/view/companyView/selector/companyPassportViewSelector.js +2 -1
- package/lib/view/companyView/selector/companyPortfolioViewSelector.js +10 -5
- package/lib/view/globalMerchantView/globalMerchantAutoCompleteView/fetchGlobalMerchantAutoCompleteViewEpic.js +2 -1
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewSelector.js +8 -4
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +6 -3
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +30 -15
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -6
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +2 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchCurrencyConversionValueEpic.js +2 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +6 -3
- package/lib/view/spendManagement/reimbursement/remiDetailView/epics/fetchRemiDetailEpic.js +2 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +26 -13
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +1 -2
- package/lib/view/subscriptionView/subscriptionViewSelector.js +26 -13
- package/lib/view/tagView/epics/createTagEpic.d.ts +36 -0
- package/lib/view/tagView/epics/createTagEpic.js +69 -0
- package/lib/view/tagView/epics/deleteTagEpic.d.ts +35 -0
- package/lib/view/tagView/epics/deleteTagEpic.js +53 -0
- package/lib/view/tagView/epics/fetchAllTagsEpic.d.ts +8 -0
- package/lib/view/tagView/epics/fetchAllTagsEpic.js +33 -0
- package/lib/view/tagView/tagViewPayload.d.ts +7 -0
- package/lib/view/tagView/tagViewPayload.js +2 -0
- package/lib/view/tagView/tagViewReducer.d.ts +27 -0
- package/lib/view/tagView/tagViewReducer.js +94 -0
- package/lib/view/tagView/tagViewSelector.d.ts +10 -0
- package/lib/view/tagView/tagViewSelector.js +17 -0
- package/lib/view/tagView/tagViewState.d.ts +6 -0
- package/lib/view/tagView/tagViewState.js +2 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +2 -0
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -1
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +1 -1
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +4 -4
- package/lib/view/taskManager/taskDetailView/taskDetail.js +1 -1
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +7 -1
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +24 -2
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +1 -2
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +5 -47
- package/lib/view/taskManager/taskListView/fetchTaskListEpic.d.ts +2 -1
- package/lib/view/taskManager/taskListView/fetchTaskListEpic.js +2 -1
- package/lib/view/taskManager/taskListView/taskListSelector.js +5 -3
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +4 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.d.ts +2 -0
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +162 -4
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +10 -0
- package/lib/view/transactionDetail/transactionDetailReducer.js +48 -2
- package/lib/view/transactionDetail/transactionDetailState.js +1 -0
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +2 -0
- package/package.json +2 -1
|
@@ -281,42 +281,49 @@ const getSubscriptionListOnSortAndFitler = (sortKey, sortOrder, filterText, filt
|
|
|
281
281
|
null) {
|
|
282
282
|
companiesWithSortKeyValue.push(company);
|
|
283
283
|
}
|
|
284
|
-
else
|
|
284
|
+
else {
|
|
285
285
|
companiesWithNoSortKeyValue.push(company);
|
|
286
|
+
}
|
|
286
287
|
break;
|
|
287
288
|
case 'controller':
|
|
288
|
-
if (company.company.company.managegmentInfo.controllerUserIds[0] != null)
|
|
289
|
+
if (company.company.company.managegmentInfo.controllerUserIds[0] != null) {
|
|
289
290
|
companiesWithSortKeyValue.push(company);
|
|
290
|
-
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
291
293
|
companiesWithNoSortKeyValue.push(company);
|
|
294
|
+
}
|
|
292
295
|
break;
|
|
293
296
|
case 'plans':
|
|
294
297
|
if (((_e = (_d = subscription === null || subscription === void 0 ? void 0 : subscription.plan) === null || _d === void 0 ? void 0 : _d.plan.name) === null || _e === void 0 ? void 0 : _e.toLowerCase()) != null) {
|
|
295
298
|
companiesWithSortKeyValue.push(company);
|
|
296
299
|
}
|
|
297
|
-
else
|
|
300
|
+
else {
|
|
298
301
|
companiesWithNoSortKeyValue.push(company);
|
|
302
|
+
}
|
|
299
303
|
break;
|
|
300
304
|
case 'planLowerLimit':
|
|
301
305
|
if (((_g = (_f = subscription === null || subscription === void 0 ? void 0 : subscription.plan) === null || _f === void 0 ? void 0 : _f.plan.slabLowerLimit) === null || _g === void 0 ? void 0 : _g.amount) != null) {
|
|
302
306
|
companiesWithSortKeyValue.push(company);
|
|
303
307
|
}
|
|
304
|
-
else
|
|
308
|
+
else {
|
|
305
309
|
companiesWithNoSortKeyValue.push(company);
|
|
310
|
+
}
|
|
306
311
|
break;
|
|
307
312
|
case 'planHigherLimit':
|
|
308
313
|
if (((_j = (_h = subscription === null || subscription === void 0 ? void 0 : subscription.plan) === null || _h === void 0 ? void 0 : _h.plan.slabUpperLimit) === null || _j === void 0 ? void 0 : _j.amount) != null) {
|
|
309
314
|
companiesWithSortKeyValue.push(company);
|
|
310
315
|
}
|
|
311
|
-
else
|
|
316
|
+
else {
|
|
312
317
|
companiesWithNoSortKeyValue.push(company);
|
|
318
|
+
}
|
|
313
319
|
break;
|
|
314
320
|
case 'avg2MonthExpenses':
|
|
315
321
|
if ((summary === null || summary === void 0 ? void 0 : summary.summary.avg2MonthExpenses.amount) != null) {
|
|
316
322
|
companiesWithSortKeyValue.push(company);
|
|
317
323
|
}
|
|
318
|
-
else
|
|
324
|
+
else {
|
|
319
325
|
companiesWithNoSortKeyValue.push(company);
|
|
326
|
+
}
|
|
320
327
|
break;
|
|
321
328
|
case 'addons': {
|
|
322
329
|
const addons = [];
|
|
@@ -328,29 +335,34 @@ const getSubscriptionListOnSortAndFitler = (sortKey, sortOrder, filterText, filt
|
|
|
328
335
|
if (addons.length === 0) {
|
|
329
336
|
companiesWithNoSortKeyValue.push(company);
|
|
330
337
|
}
|
|
331
|
-
else
|
|
338
|
+
else {
|
|
332
339
|
companiesWithSortKeyValue.push(company);
|
|
340
|
+
}
|
|
333
341
|
break;
|
|
334
342
|
}
|
|
335
343
|
case 'monthlyRecurringRevenue':
|
|
336
344
|
if ((summary === null || summary === void 0 ? void 0 : summary.summary.monthlyRecurringRevenue.amount) != null) {
|
|
337
345
|
companiesWithSortKeyValue.push(company);
|
|
338
346
|
}
|
|
339
|
-
else
|
|
347
|
+
else {
|
|
340
348
|
companiesWithNoSortKeyValue.push(company);
|
|
349
|
+
}
|
|
341
350
|
break;
|
|
342
351
|
case 'notes':
|
|
343
|
-
if ((summary === null || summary === void 0 ? void 0 : summary.summary.note) != null)
|
|
352
|
+
if ((summary === null || summary === void 0 ? void 0 : summary.summary.note) != null) {
|
|
344
353
|
companiesWithSortKeyValue.push(company);
|
|
345
|
-
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
346
356
|
companiesWithNoSortKeyValue.push(company);
|
|
357
|
+
}
|
|
347
358
|
break;
|
|
348
359
|
case 'upgradeStatus':
|
|
349
360
|
if (((_k = summary === null || summary === void 0 ? void 0 : summary.summary.recommendedActionCode) === null || _k === void 0 ? void 0 : _k.toLowerCase()) != null) {
|
|
350
361
|
companiesWithSortKeyValue.push(company);
|
|
351
362
|
}
|
|
352
|
-
else
|
|
363
|
+
else {
|
|
353
364
|
companiesWithNoSortKeyValue.push(company);
|
|
365
|
+
}
|
|
354
366
|
}
|
|
355
367
|
});
|
|
356
368
|
const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValue, [
|
|
@@ -392,9 +404,10 @@ const getSubscriptionListOnSortAndFitler = (sortKey, sortOrder, filterText, filt
|
|
|
392
404
|
(subscription.addOns == null || subscription.addOns.length === 0)) {
|
|
393
405
|
primarySortValue = '';
|
|
394
406
|
}
|
|
395
|
-
else
|
|
407
|
+
else {
|
|
396
408
|
primarySortValue =
|
|
397
409
|
(_p = (_o = subscription === null || subscription === void 0 ? void 0 : subscription.addOns[0].addOn) === null || _o === void 0 ? void 0 : _o.name.toLowerCase()) !== null && _p !== void 0 ? _p : '';
|
|
410
|
+
}
|
|
398
411
|
break;
|
|
399
412
|
case 'monthlyRecurringRevenue':
|
|
400
413
|
primarySortValue =
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { createTag, updateTagCreateStatus } from '../tagViewReducer';
|
|
5
|
+
import { updateTags } from '../../../entity/tag/tagReducer';
|
|
6
|
+
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
7
|
+
import { updateCreatedTagToLocalStore } from '../../taskManager/taskDetailView/taskDetailReducer';
|
|
8
|
+
export declare type ActionType = ReturnType<typeof createTag> | ReturnType<typeof updateTagCreateStatus> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateCreatedTagToLocalStore> | ReturnType<typeof updateTags>;
|
|
9
|
+
export declare const createTagEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
10
|
+
payload: {
|
|
11
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated";
|
|
12
|
+
messageText: "failed" | "success";
|
|
13
|
+
type: import("../../..").SnackbarMessageType;
|
|
14
|
+
showStatusIcon?: boolean | undefined;
|
|
15
|
+
variables?: {
|
|
16
|
+
variableName: string;
|
|
17
|
+
variableValue: string;
|
|
18
|
+
}[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
type: string;
|
|
21
|
+
} | {
|
|
22
|
+
payload: {
|
|
23
|
+
fetchState: import("../../../commonStateTypes/common").FetchState;
|
|
24
|
+
tagsId: string[];
|
|
25
|
+
error?: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
26
|
+
};
|
|
27
|
+
type: string;
|
|
28
|
+
} | {
|
|
29
|
+
payload: {
|
|
30
|
+
tagId: string;
|
|
31
|
+
taskId?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
type: string;
|
|
34
|
+
} | import("@reduxjs/toolkit").PayloadAction<import("../../../entity/tag/tagPayload").TagPayload[], string, {
|
|
35
|
+
updateType: import("../../../commonStateTypes/common").UpdateType;
|
|
36
|
+
}, never>>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTagEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const tagViewReducer_1 = require("../tagViewReducer");
|
|
8
|
+
const tagReducer_1 = require("../../../entity/tag/tagReducer");
|
|
9
|
+
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
10
|
+
const taskDetailReducer_1 = require("../../taskManager/taskDetailView/taskDetailReducer");
|
|
11
|
+
const createTagEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(tagViewReducer_1.createTag.match), (0, operators_1.mergeMap)(function (action) {
|
|
12
|
+
const { tagName, taskId } = action.payload;
|
|
13
|
+
return handleCreateTag(tagName, zeniAPI, taskId);
|
|
14
|
+
}));
|
|
15
|
+
exports.createTagEpic = createTagEpic;
|
|
16
|
+
const handleCreateTag = (tagName, zeniAPI, taskId) => {
|
|
17
|
+
const payload = Object.assign({}, prepareCreateTagPayload(tagName));
|
|
18
|
+
const createTagApi$ = zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tags`, payload);
|
|
19
|
+
return createTagApi$.pipe((0, operators_1.mergeMap)((response) => handleCreateTagResponse(response, taskId)), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, tagViewReducer_1.updateTagCreateStatus)({
|
|
20
|
+
fetchState: 'Error',
|
|
21
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Create Tag REST API call errored out ' + JSON.stringify(error)),
|
|
22
|
+
tagsId: [],
|
|
23
|
+
}))));
|
|
24
|
+
};
|
|
25
|
+
const handleCreateTagResponse = (response, taskId) => {
|
|
26
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) &&
|
|
27
|
+
response.data != null &&
|
|
28
|
+
response.data.tags.length > 0) {
|
|
29
|
+
return (0, rxjs_1.from)([
|
|
30
|
+
(0, tagReducer_1.updateTags)(response.data.tags),
|
|
31
|
+
(0, tagViewReducer_1.updateTagCreateStatus)({
|
|
32
|
+
fetchState: 'Completed',
|
|
33
|
+
tagsId: response.data.tags.map((tag) => tag.tag_id),
|
|
34
|
+
}),
|
|
35
|
+
(0, taskDetailReducer_1.updateCreatedTagToLocalStore)({
|
|
36
|
+
tagId: response.data.tags[0].tag_id,
|
|
37
|
+
taskId: taskId,
|
|
38
|
+
}),
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return (0, rxjs_1.from)([
|
|
43
|
+
(0, tagViewReducer_1.updateTagCreateStatus)({
|
|
44
|
+
fetchState: 'Error',
|
|
45
|
+
error: response.status,
|
|
46
|
+
tagsId: [],
|
|
47
|
+
}),
|
|
48
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
49
|
+
messageSection: 'create_tag',
|
|
50
|
+
messageText: 'failed',
|
|
51
|
+
type: 'error',
|
|
52
|
+
variables: [
|
|
53
|
+
{
|
|
54
|
+
variableName: '_api-error_',
|
|
55
|
+
variableValue: response.status.message,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
}),
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Helpers
|
|
64
|
+
*/
|
|
65
|
+
const prepareCreateTagPayload = (tagName) => {
|
|
66
|
+
return {
|
|
67
|
+
name: tagName,
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
3
|
+
import { deleteTag, updateDeleteTagStatus } from '../tagViewReducer';
|
|
4
|
+
import { RootState } from '../../../reducer';
|
|
5
|
+
import { updateTags } from '../../../entity/tag/tagReducer';
|
|
6
|
+
export declare type ActionType = ReturnType<typeof deleteTag> | ReturnType<typeof updateDeleteTagStatus> | ReturnType<typeof updateTags>;
|
|
7
|
+
export declare const deleteTagEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
8
|
+
payload: string;
|
|
9
|
+
type: string;
|
|
10
|
+
} | {
|
|
11
|
+
payload: {
|
|
12
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated";
|
|
13
|
+
messageText: "failed" | "success";
|
|
14
|
+
type: import("../../..").SnackbarMessageType;
|
|
15
|
+
showStatusIcon?: boolean | undefined;
|
|
16
|
+
variables?: {
|
|
17
|
+
variableName: string;
|
|
18
|
+
variableValue: string;
|
|
19
|
+
}[] | undefined;
|
|
20
|
+
};
|
|
21
|
+
type: string;
|
|
22
|
+
} | {
|
|
23
|
+
payload: {
|
|
24
|
+
fetchState: import("../../..").FetchState;
|
|
25
|
+
tagId: string;
|
|
26
|
+
error?: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
27
|
+
};
|
|
28
|
+
type: string;
|
|
29
|
+
} | {
|
|
30
|
+
payload: {
|
|
31
|
+
tagId: string | undefined;
|
|
32
|
+
taskId: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
type: string;
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteTagEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const tagViewReducer_1 = require("../tagViewReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
8
|
+
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
9
|
+
const tagReducer_1 = require("../../../entity/tag/tagReducer");
|
|
10
|
+
const taskDetailReducer_1 = require("../../taskManager/taskDetailView/taskDetailReducer");
|
|
11
|
+
const deleteTagEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(tagViewReducer_1.deleteTag.match), (0, operators_1.mergeMap)((action) => {
|
|
12
|
+
const { tagId, taskId } = action.payload;
|
|
13
|
+
return zeniAPI
|
|
14
|
+
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tags/${tagId}`)
|
|
15
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
|
+
if ((0, responsePayload_1.isSuccessStatus)(response) && response.data != null) {
|
|
17
|
+
return (0, rxjs_1.from)([
|
|
18
|
+
(0, tagViewReducer_1.updateDeleteTagStatus)({ fetchState: 'Completed', tagId }),
|
|
19
|
+
(0, tagReducer_1.removeTag)(tagId),
|
|
20
|
+
(0, taskDetailReducer_1.updateDeletedTagToLocalStore)({
|
|
21
|
+
tagId: tagId,
|
|
22
|
+
taskId: taskId,
|
|
23
|
+
}),
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return (0, rxjs_1.from)([
|
|
28
|
+
(0, tagViewReducer_1.updateDeleteTagStatus)({
|
|
29
|
+
fetchState: 'Error',
|
|
30
|
+
tagId,
|
|
31
|
+
error: response.status,
|
|
32
|
+
}),
|
|
33
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
34
|
+
messageSection: 'delete_tag',
|
|
35
|
+
messageText: 'failed',
|
|
36
|
+
type: 'error',
|
|
37
|
+
variables: [
|
|
38
|
+
{
|
|
39
|
+
variableName: '_api-error_',
|
|
40
|
+
variableValue: response.status.message,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
}),
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
46
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, tagViewReducer_1.updateDeleteTagStatus)({
|
|
47
|
+
fetchState: 'Error',
|
|
48
|
+
tagId,
|
|
49
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Delete tag REST API call errored out ' +
|
|
50
|
+
JSON.stringify(error)),
|
|
51
|
+
}))));
|
|
52
|
+
}));
|
|
53
|
+
exports.deleteTagEpic = deleteTagEpic;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
+
import { fetchTagList, updateTagList, updateTagListFetchStatus } from '../tagViewReducer';
|
|
6
|
+
import { updateTags } from '../../../entity/tag/tagReducer';
|
|
7
|
+
export declare type ActionType = ReturnType<typeof fetchTagList> | ReturnType<typeof updateTagList> | ReturnType<typeof updateTagListFetchStatus> | ReturnType<typeof updateTags>;
|
|
8
|
+
export declare const fetchAllTagsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchAllTagsEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const tagViewReducer_1 = require("../tagViewReducer");
|
|
8
|
+
const tagReducer_1 = require("../../../entity/tag/tagReducer");
|
|
9
|
+
const fetchAllTagsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(tagViewReducer_1.fetchTagList.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
const queryParam = { filter_type: 'all' };
|
|
11
|
+
return zeniAPI
|
|
12
|
+
.getJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tags?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
13
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
14
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
15
|
+
return (0, rxjs_1.of)((0, tagReducer_1.updateTags)(response.data.tags), (0, tagViewReducer_1.updateTagList)({
|
|
16
|
+
data: response.data.tags,
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return (0, rxjs_1.of)((0, tagViewReducer_1.updateTagListFetchStatus)({
|
|
21
|
+
fetchState: 'Error',
|
|
22
|
+
error: response.status,
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
}), (0, operators_1.catchError)((error) => {
|
|
26
|
+
return (0, rxjs_1.of)((0, tagViewReducer_1.updateTagListFetchStatus)({
|
|
27
|
+
fetchState: 'Error',
|
|
28
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Tag List REST API call errored out' +
|
|
29
|
+
JSON.stringify(error)),
|
|
30
|
+
}));
|
|
31
|
+
}));
|
|
32
|
+
}));
|
|
33
|
+
exports.fetchAllTagsEpic = fetchAllTagsEpic;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TagPayload } from '../../entity/tag/tagPayload';
|
|
2
|
+
import { ZeniAPIResponse } from '../../responsePayload';
|
|
3
|
+
export declare type DeleteTagResponse = ZeniAPIResponse<FetchTagListPayload>;
|
|
4
|
+
export interface FetchTagListPayload {
|
|
5
|
+
tags: TagPayload[];
|
|
6
|
+
}
|
|
7
|
+
export declare type FetchTagListResponse = ZeniAPIResponse<FetchTagListPayload>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TagViewState } from './tagViewState';
|
|
2
|
+
import { FetchState, ID } from '../../commonStateTypes/common';
|
|
3
|
+
import { ZeniAPIStatus } from '../../responsePayload';
|
|
4
|
+
import { TagPayload } from '../../entity/tag/tagPayload';
|
|
5
|
+
export declare const initialState: TagViewState;
|
|
6
|
+
export declare const fetchTagList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateTagListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
7
|
+
fetchState: FetchState;
|
|
8
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
9
|
+
}, string>, updateTagList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
|
+
data: TagPayload[];
|
|
11
|
+
}, string>, createTag: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tagName: string, taskId: any], {
|
|
12
|
+
tagName: string;
|
|
13
|
+
taskId: any;
|
|
14
|
+
}, string, never, never>, updateTagCreateStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
|
+
fetchState: FetchState;
|
|
16
|
+
tagsId: ID[];
|
|
17
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
18
|
+
}, string>, deleteTag: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tagId: string, taskId: any], {
|
|
19
|
+
tagId: string;
|
|
20
|
+
taskId: any;
|
|
21
|
+
}, string, never, never>, updateDeleteTagStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
22
|
+
fetchState: FetchState;
|
|
23
|
+
tagId: ID;
|
|
24
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
25
|
+
}, string>, clearTagView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
26
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<TagViewState, import("@reduxjs/toolkit").AnyAction>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearTagView = exports.updateDeleteTagStatus = exports.deleteTag = exports.updateTagCreateStatus = exports.createTag = exports.updateTagList = exports.updateTagListFetchStatus = exports.fetchTagList = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
exports.initialState = {
|
|
7
|
+
tagsId: [],
|
|
8
|
+
fetchState: 'Not-Started',
|
|
9
|
+
error: undefined,
|
|
10
|
+
tagDeleteStatusById: {},
|
|
11
|
+
tagCreateStatus: {
|
|
12
|
+
fetchState: 'Not-Started',
|
|
13
|
+
error: undefined,
|
|
14
|
+
},
|
|
15
|
+
hasValidState() {
|
|
16
|
+
return this.fetchState == 'Completed';
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
const tagView = (0, toolkit_1.createSlice)({
|
|
20
|
+
name: 'tagView',
|
|
21
|
+
initialState: exports.initialState,
|
|
22
|
+
reducers: {
|
|
23
|
+
fetchTagList(draft) {
|
|
24
|
+
draft.fetchState = 'In-Progress';
|
|
25
|
+
draft.error = undefined;
|
|
26
|
+
},
|
|
27
|
+
updateTagList(draft, action) {
|
|
28
|
+
const { data } = action.payload;
|
|
29
|
+
draft.error = undefined;
|
|
30
|
+
const newTags = data.map((tag) => tag.tag_id);
|
|
31
|
+
draft.tagsId = [...new Set([...draft.tagsId, ...newTags])];
|
|
32
|
+
draft.fetchState = 'Completed';
|
|
33
|
+
},
|
|
34
|
+
updateTagListFetchStatus(draft, action) {
|
|
35
|
+
draft.fetchState = action.payload.fetchState;
|
|
36
|
+
draft.error = action.payload.error;
|
|
37
|
+
},
|
|
38
|
+
createTag: {
|
|
39
|
+
reducer(draft) {
|
|
40
|
+
draft.tagCreateStatus = {
|
|
41
|
+
fetchState: 'In-Progress',
|
|
42
|
+
error: undefined,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
prepare(tagName, taskId) {
|
|
46
|
+
return {
|
|
47
|
+
payload: {
|
|
48
|
+
tagName,
|
|
49
|
+
taskId,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
updateTagCreateStatus(draft, action) {
|
|
55
|
+
const currentTagsList = draft.tagsId;
|
|
56
|
+
draft.tagsId = [
|
|
57
|
+
...new Set([...action.payload.tagsId, ...currentTagsList]),
|
|
58
|
+
];
|
|
59
|
+
draft.tagCreateStatus = {
|
|
60
|
+
fetchState: action.payload.fetchState,
|
|
61
|
+
error: action.payload.error,
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
deleteTag: {
|
|
65
|
+
reducer(draft, action) {
|
|
66
|
+
draft.tagDeleteStatusById[action.payload.tagId] = {
|
|
67
|
+
fetchState: 'In-Progress',
|
|
68
|
+
error: undefined,
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
prepare(tagId, taskId) {
|
|
72
|
+
return {
|
|
73
|
+
payload: {
|
|
74
|
+
tagId,
|
|
75
|
+
taskId,
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
updateDeleteTagStatus(draft, action) {
|
|
81
|
+
const { fetchState, tagId, error } = action.payload;
|
|
82
|
+
draft.tagsId = draft.tagsId.filter((tag) => tag !== tagId);
|
|
83
|
+
draft.tagDeleteStatusById[action.payload.tagId] = {
|
|
84
|
+
fetchState: fetchState,
|
|
85
|
+
error: error,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
clearTagView(draft) {
|
|
89
|
+
Object.assign(draft, exports.initialState);
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
_a = tagView.actions, exports.fetchTagList = _a.fetchTagList, exports.updateTagListFetchStatus = _a.updateTagListFetchStatus, exports.updateTagList = _a.updateTagList, exports.createTag = _a.createTag, exports.updateTagCreateStatus = _a.updateTagCreateStatus, exports.deleteTag = _a.deleteTag, exports.updateDeleteTagStatus = _a.updateDeleteTagStatus, exports.clearTagView = _a.clearTagView;
|
|
94
|
+
exports.default = tagView.reducer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { Tag } from '../../entity/tag/tagState';
|
|
4
|
+
import { RootState } from '../../reducer';
|
|
5
|
+
export interface TagViewSelectorView extends SelectorView {
|
|
6
|
+
tagList: Tag[];
|
|
7
|
+
tagCreateStatus: FetchStateAndError;
|
|
8
|
+
tagDeleteStatusById: Record<ID, FetchStateAndError>;
|
|
9
|
+
}
|
|
10
|
+
export declare const getAllTags: (state: RootState) => TagViewSelectorView;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAllTags = void 0;
|
|
4
|
+
const tagSelector_1 = require("../../entity/tag/tagSelector");
|
|
5
|
+
const getAllTags = (state) => {
|
|
6
|
+
const { tagState, tagViewState } = state;
|
|
7
|
+
const tagList = (0, tagSelector_1.getTagsByIds)(tagState, tagViewState.tagsId);
|
|
8
|
+
return {
|
|
9
|
+
tagList: tagList,
|
|
10
|
+
fetchState: tagViewState.fetchState,
|
|
11
|
+
tagDeleteStatusById: tagViewState.tagDeleteStatusById,
|
|
12
|
+
tagCreateStatus: tagViewState.tagCreateStatus,
|
|
13
|
+
error: undefined,
|
|
14
|
+
version: 0,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
exports.getAllTags = getAllTags;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { fetchTaskDetail, updateEditTaskFetchStatus, removeTaskDetail, initializeTaskToLocalStore } from '../taskDetailReducer';
|
|
4
|
+
import { updateTags } from '../../../../entity/tag/tagReducer';
|
|
4
5
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
6
|
import { RootState } from '../../../../reducer';
|
|
6
7
|
import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
7
8
|
import { fetchFileList } from '../../../fileView/fileViewReducer';
|
|
8
9
|
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
9
|
-
export declare type ActionType = ReturnType<typeof fetchTaskDetail> | ReturnType<typeof updateEditTaskFetchStatus> | ReturnType<typeof removeTaskDetail> | ReturnType<typeof updateTasks> | ReturnType<typeof initializeTaskToLocalStore> | ReturnType<typeof fetchFileList> | ReturnType<typeof openSnackbar>;
|
|
10
|
+
export declare type ActionType = ReturnType<typeof fetchTaskDetail> | ReturnType<typeof updateTags> | ReturnType<typeof updateEditTaskFetchStatus> | ReturnType<typeof removeTaskDetail> | ReturnType<typeof updateTasks> | ReturnType<typeof initializeTaskToLocalStore> | ReturnType<typeof fetchFileList> | ReturnType<typeof openSnackbar>;
|
|
10
11
|
export declare const fetchTaskDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -8,6 +8,7 @@ const rxjs_1 = require("rxjs");
|
|
|
8
8
|
const operators_1 = require("rxjs/operators");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
10
|
const taskDetailReducer_1 = require("../taskDetailReducer");
|
|
11
|
+
const tagReducer_1 = require("../../../../entity/tag/tagReducer");
|
|
11
12
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
12
13
|
const taskReducer_1 = require("../../../../entity/task/taskReducer");
|
|
13
14
|
const fileViewReducer_1 = require("../../../fileView/fileViewReducer");
|
|
@@ -34,6 +35,7 @@ const fetchTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
34
35
|
taskId,
|
|
35
36
|
fetchState: 'Completed',
|
|
36
37
|
}),
|
|
38
|
+
(0, tagReducer_1.updateTags)(response.data.tasks.map((task) => task.tags).flat()),
|
|
37
39
|
(0, taskDetailReducer_1.initializeTaskToLocalStore)(taskId),
|
|
38
40
|
];
|
|
39
41
|
const fileIds = response.data.tasks[0].file_ids;
|
|
@@ -20,7 +20,7 @@ const initializeTaskToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
|
|
|
20
20
|
assignee: task.assignees,
|
|
21
21
|
dueDate: task.dueDate,
|
|
22
22
|
priority: task.priority.code,
|
|
23
|
-
|
|
23
|
+
tagIds: task.tagIds,
|
|
24
24
|
fileIds: task.fileIds,
|
|
25
25
|
type: task.type,
|
|
26
26
|
recurringFrequency: task.recurringFrequency,
|
|
@@ -73,7 +73,7 @@ const prepareTaskPayload = (state, taskId) => {
|
|
|
73
73
|
due_date: (_d = (_c = localData.dueDate) === null || _c === void 0 ? void 0 : _c.format('YYYY-MM-DD')) !== null && _d !== void 0 ? _d : null,
|
|
74
74
|
priority: localData.priority,
|
|
75
75
|
status: localData.status,
|
|
76
|
-
|
|
76
|
+
tags: localData.tagIds,
|
|
77
77
|
file_ids: localData.fileIds,
|
|
78
78
|
type: localData.type.code,
|
|
79
79
|
recurring_end_date: localData.type.code === 'recurring'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { TaskStatusCodeType, PriorityCodeType,
|
|
2
|
+
import { TaskStatusCodeType, PriorityCodeType, TaskType } from '../../../entity/task/taskState';
|
|
3
3
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
4
4
|
import { RecurringDatePickerOptions, RecurringFrequencyType } from '../../common/recurringViewHelper';
|
|
5
5
|
import { CommonHistoryView } from '../../spendManagement/commonHistoryView/commonHistory';
|
|
@@ -21,19 +21,19 @@ export interface EditTaskLocalData {
|
|
|
21
21
|
description: string;
|
|
22
22
|
status: TaskStatusCodeType;
|
|
23
23
|
assignee: ID[];
|
|
24
|
-
|
|
24
|
+
tagIds: ID[];
|
|
25
25
|
priority: PriorityCodeType;
|
|
26
|
-
tag?: TaskTagCodeType;
|
|
27
26
|
type: TaskType;
|
|
28
27
|
recurringEndDateLocalData: {
|
|
29
28
|
recurringDatePickerOptionsType?: RecurringDatePickerOptions;
|
|
30
29
|
recurringEndDate?: ZeniDate;
|
|
31
30
|
recurringCount?: number;
|
|
32
31
|
};
|
|
32
|
+
fileIds: ID[];
|
|
33
33
|
savedRecurringEndDate?: ZeniDate;
|
|
34
34
|
savedRecurringTasksCount?: number;
|
|
35
35
|
recurringFrequency?: RecurringFrequencyType;
|
|
36
36
|
recurringStartDate?: ZeniDate;
|
|
37
|
-
|
|
37
|
+
dueDate?: ZeniDate;
|
|
38
38
|
}
|
|
39
39
|
export declare const initialTaskDetail: EditTaskDetail;
|