102 lines
5.0 KiB
JavaScript
102 lines
5.0 KiB
JavaScript
"use strict";
|
|
self["webpackHotUpdate_459579c7_954c_469e_b707_ca75d808603f_0_0_1"]("ct-forms-portal-web-part",{
|
|
|
|
/***/ 996:
|
|
/*!**************************************************************************!*\
|
|
!*** ./lib/webparts/ctFormsPortal/components/config/ctDocumentConfig.js ***!
|
|
\**************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ createCtDocumentConfig: () => (/* binding */ createCtDocumentConfig)
|
|
/* harmony export */ });
|
|
var STATUS_LABEL = {
|
|
'Черновик': 'Сформирована',
|
|
'На согласовании': 'На согласовании',
|
|
'Согласовано': 'Согласована',
|
|
'Отклонено': 'Отклонена'
|
|
};
|
|
var STATUS_VARIANT = {
|
|
'Черновик': 'neutral',
|
|
'На согласовании': 'info',
|
|
'Согласовано': 'success',
|
|
'Отклонено': 'error'
|
|
};
|
|
function createCtDocumentConfig() {
|
|
return {
|
|
typeKey: 'ct',
|
|
typeLabel: 'СТ ОМТС',
|
|
icon: 'ShoppingCart',
|
|
// Списки СТ ОМТС — на сайте СЭД. Явно, чтобы портал не зависел от места размещения.
|
|
siteUrl: 'https://tnsukz.sharepoint.com/sites/sed',
|
|
myDocsListName: 'Сравнительная таблица',
|
|
buildMyDocsFilter: function (userId) { return "AuthorId eq ".concat(userId); },
|
|
myDocsSelect: 'Id,Title,number,project,status,Created',
|
|
pendingApproval: {
|
|
approvalListName: 'Согласование СТ',
|
|
buildPendingFilter: function (userId) { return "aproover/Id eq ".concat(userId, " and status eq '\u041D\u0430 \u0441\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0438'"); },
|
|
approvalSelect: 'Id,CTId,status,aproover/Id',
|
|
approvalExpand: 'aproover',
|
|
parentIdField: 'CTId',
|
|
buildParentQuery: function (parentIds) { return ({
|
|
listName: 'Сравнительная таблица',
|
|
filter: parentIds.map(function (id) { return "Id eq ".concat(id); }).join(' or '),
|
|
select: 'Id,Title,number,project,status,Created'
|
|
}); }
|
|
},
|
|
approvedByMe: {
|
|
approvalListName: 'Согласование СТ',
|
|
buildPendingFilter: function (userId) { return "aproover/Id eq ".concat(userId, " and status eq '\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u043E'"); },
|
|
approvalSelect: 'Id,CTId,status,aproover/Id',
|
|
approvalExpand: 'aproover',
|
|
parentIdField: 'CTId',
|
|
buildParentQuery: function (parentIds) { return ({
|
|
listName: 'Сравнительная таблица',
|
|
filter: parentIds.map(function (id) { return "Id eq ".concat(id); }).join(' or '),
|
|
select: 'Id,Title,number,project,status,Created'
|
|
}); }
|
|
},
|
|
buildLinkUrl: function (row) {
|
|
var base = 'https://tnsukz.sharepoint.com/sites/sed/SitePages/Сравнительная-таблица.aspx';
|
|
var param = row.status === 'Черновик' ? 'ctId' : 'ctid';
|
|
return "".concat(base, "?").concat(param, "=").concat(row.id);
|
|
},
|
|
createNewUrl: 'https://tnsukz.sharepoint.com/sites/sed/SitePages/Сравнительная-таблица.aspx',
|
|
createNewLabel: 'Создать новую форму СТ',
|
|
mapItem: function (raw) {
|
|
var _a, _b, _c, _d, _e;
|
|
var spStatus = String((_a = raw['status']) !== null && _a !== void 0 ? _a : '');
|
|
return {
|
|
typeKey: 'ct',
|
|
id: String(raw['Id']),
|
|
title: "\u0421\u0422 \u2116".concat((_b = raw['number']) !== null && _b !== void 0 ? _b : raw['Title']),
|
|
subtitle: String((_c = raw['project']) !== null && _c !== void 0 ? _c : ''),
|
|
status: spStatus,
|
|
statusLabel: (_d = STATUS_LABEL[spStatus]) !== null && _d !== void 0 ? _d : spStatus,
|
|
statusVariant: (_e = STATUS_VARIANT[spStatus]) !== null && _e !== void 0 ? _e : 'neutral',
|
|
createdDate: raw['Created'] ? String(raw['Created']) : undefined
|
|
};
|
|
},
|
|
columns: [
|
|
{ key: 'title', label: 'Номер СТ', minWidth: 120 },
|
|
{ key: 'subtitle', label: 'Проект', minWidth: 180 },
|
|
{ key: 'status', label: 'Статус', minWidth: 130 },
|
|
{ key: 'created', label: 'Создана', minWidth: 110 }
|
|
]
|
|
};
|
|
}
|
|
|
|
|
|
/***/ })
|
|
|
|
},
|
|
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
|
/******/ /* webpack/runtime/getFullHash */
|
|
/******/ (() => {
|
|
/******/ __webpack_require__.h = () => ("c0c82c263a05c3417a10")
|
|
/******/ })();
|
|
/******/
|
|
/******/ }
|
|
);
|
|
//# sourceMappingURL=ct-forms-portal-web-part.8bc87a793f5dc3d11d32.hot-update.js.map
|