@tachybase/module-hera 1.9.8
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/.turbo/turbo-build.log +11 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/components/PDFViewer.d.ts +11 -0
- package/dist/client/components/SignatureInput.d.ts +2 -0
- package/dist/client/components/SignaturePad.d.ts +240 -0
- package/dist/client/components/custom-components/CustomAssociatedField.d.ts +2 -0
- package/dist/client/components/custom-components/CustomComponentDispatcher.d.ts +5 -0
- package/dist/client/components/custom-components/CustomField.d.ts +2 -0
- package/dist/client/components/custom-components/ErrorBoundary.d.ts +2 -0
- package/dist/client/components/custom-components/custom-components.d.ts +21 -0
- package/dist/client/components/excel-table/ExcelFile.d.ts +2 -0
- package/dist/client/components/excel-table/Sheet.d.ts +10 -0
- package/dist/client/components/fields/AssociatedField.d.ts +7 -0
- package/dist/client/components/fields/CalcResult.d.ts +1 -0
- package/dist/client/components/fields/Expression.d.ts +3 -0
- package/dist/client/components/index.d.ts +11 -0
- package/dist/client/components/modal-full-screen/ModalFullScreen.d.ts +15 -0
- package/dist/client/components/modal-full-screen/ModalFullScreenChild.d.ts +2 -0
- package/dist/client/features/block-group/GroupBlock.d.ts +4 -0
- package/dist/client/features/block-group/GroupBlockConfigure.d.ts +19 -0
- package/dist/client/features/block-group/GroupBlockInitializer.d.ts +9 -0
- package/dist/client/features/block-group/index.d.ts +4 -0
- package/dist/client/features/custom-components/index.d.ts +5 -0
- package/dist/client/features/departments/common/DepartmentTable.schema.d.ts +50 -0
- package/dist/client/features/departments/common/DepartmentTable.view.d.ts +5 -0
- package/dist/client/features/departments/common/FilterKeys.context.d.ts +10 -0
- package/dist/client/features/departments/common/InternalDepartmentTable.d.ts +6 -0
- package/dist/client/features/departments/common/Request.povider.d.ts +2 -0
- package/dist/client/features/departments/common/UserDepartmentsFieldNotSupport.d.ts +2 -0
- package/dist/client/features/departments/common/scopes/useDepartmentFilterActionProps.d.ts +5 -0
- package/dist/client/features/departments/common/scopes/useFilterActionProps.d.ts +5 -0
- package/dist/client/features/departments/index.d.ts +5 -0
- package/dist/client/features/departments/main-tab/DepartmentIndex.d.ts +6 -0
- package/dist/client/features/departments/main-tab/DepartmentIndex.provider.d.ts +4 -0
- package/dist/client/features/departments/main-tab/DepartmentManagement.component.d.ts +2 -0
- package/dist/client/features/departments/main-tab/DepartmentManagement.schema.d.ts +10 -0
- package/dist/client/features/departments/main-tab/DepartmentManagement.view.d.ts +2 -0
- package/dist/client/features/departments/main-tab/collections/departments.collection.d.ts +128 -0
- package/dist/client/features/departments/main-tab/collections/users.collection.d.ts +189 -0
- package/dist/client/features/departments/main-tab/components/DepartmentSelect.d.ts +2 -0
- package/dist/client/features/departments/main-tab/components/InternalSuperiorDepartmentSelect.d.ts +2 -0
- package/dist/client/features/departments/main-tab/components/SuperiorDepartmentSelect.d.ts +2 -0
- package/dist/client/features/departments/main-tab/context/Department.context.d.ts +23 -0
- package/dist/client/features/departments/main-tab/context/DepartmentsExpanded.context.d.ts +17 -0
- package/dist/client/features/departments/main-tab/departments-block/AddNewDepartment.schema.d.ts +67 -0
- package/dist/client/features/departments/main-tab/departments-block/AddNewDepartment.view.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-block/DepartmentOwnersField.component.d.ts +6 -0
- package/dist/client/features/departments/main-tab/departments-block/DepartmentsBlock.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-block/DepartmentsSearch.component.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-block/DepartmentsTree.component.d.ts +9 -0
- package/dist/client/features/departments/main-tab/departments-block/Request.provider.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-block/UnknownOwerns.schema.d.ts +136 -0
- package/dist/client/features/departments/main-tab/departments-block/UnknownOwerns.view.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-block/schemas/schemaDepartmentEdit.d.ts +62 -0
- package/dist/client/features/departments/main-tab/departments-block/schemas/schemaDepartmentNewSub.d.ts +57 -0
- package/dist/client/features/departments/main-tab/departments-block/scopes/useCreateDepartment.d.ts +3 -0
- package/dist/client/features/departments/main-tab/departments-block/scopes/useUpdateDepartment.d.ts +3 -0
- package/dist/client/features/departments/main-tab/departments-users-block/AddMembers.schema.d.ts +148 -0
- package/dist/client/features/departments/main-tab/departments-users-block/AddMembers.view.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-users-block/DepartmentField.component.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-users-block/DepartmentsUsersBlock.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-users-block/DepartmentsUsersBlock.schema.d.ts +676 -0
- package/dist/client/features/departments/main-tab/departments-users-block/IsOwnerField.component.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-users-block/MemberActions.schema.d.ts +49 -0
- package/dist/client/features/departments/main-tab/departments-users-block/MemberActions.view.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-users-block/RowRemoveAction.schema.d.ts +16 -0
- package/dist/client/features/departments/main-tab/departments-users-block/RowRemoveAction.view.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-users-block/UserDepartmentsField.component.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-users-block/UserSelectDepartment.schema.d.ts +42 -0
- package/dist/client/features/departments/main-tab/departments-users-block/UserSelectDepartment.view.d.ts +2 -0
- package/dist/client/features/departments/main-tab/departments-users-block/scopes/useBulkRemoveMembersAction.d.ts +3 -0
- package/dist/client/features/departments/main-tab/departments-users-block/scopes/useDataSource.d.ts +40 -0
- package/dist/client/features/departments/main-tab/departments-users-block/scopes/useMembersDataSource.d.ts +6 -0
- package/dist/client/features/departments/main-tab/departments-users-block/scopes/usePropsAddMember.d.ts +1 -0
- package/dist/client/features/departments/main-tab/departments-users-block/scopes/useRefreshActionProps.d.ts +3 -0
- package/dist/client/features/departments/main-tab/departments-users-block/scopes/useRemoveMemberAction.d.ts +3 -0
- package/dist/client/features/departments/main-tab/departments-users-block/scopes/useShowTotal.d.ts +1 -0
- package/dist/client/features/departments/main-tab/hooks/useDeepTree.d.ts +14 -0
- package/dist/client/features/departments/main-tab/hooks/useGetDepTree.d.ts +18 -0
- package/dist/client/features/departments/main-tab/kit.d.ts +4 -0
- package/dist/client/features/departments/main-tab/providers/DepartmentsResource.provider.d.ts +4 -0
- package/dist/client/features/departments/main-tab/providers/UserResource.provider.d.ts +4 -0
- package/dist/client/features/departments/role-auth/DepartmentTitle.component.d.ts +2 -0
- package/dist/client/features/departments/role-auth/Departments.d.ts +2 -0
- package/dist/client/features/departments/role-auth/Departments.schema.d.ts +227 -0
- package/dist/client/features/departments/role-auth/kit.d.ts +4 -0
- package/dist/client/features/departments/role-auth/scopes/useAddDepartments.d.ts +3 -0
- package/dist/client/features/departments/role-auth/scopes/useBulkRemoveDepartments.d.ts +3 -0
- package/dist/client/features/departments/role-auth/scopes/useDataSource.d.ts +40 -0
- package/dist/client/features/departments/role-auth/scopes/useDisabled.d.ts +3 -0
- package/dist/client/features/departments/role-auth/scopes/useRemoveDepartment.d.ts +3 -0
- package/dist/client/features/departments/settings/DepartmentOwnersFieldSetting.d.ts +2 -0
- package/dist/client/features/departments/settings/UserDepartmentsFieldSetting.d.ts +2 -0
- package/dist/client/features/departments/settings/UserMainDepartmentFieldSetting.d.ts +2 -0
- package/dist/client/features/departments/settings/items/enableLinkItem.d.ts +2 -0
- package/dist/client/features/departments/settings/items/modeSelectItem.d.ts +2 -0
- package/dist/client/features/departments/settings/items/titleFieldItem.d.ts +2 -0
- package/dist/client/features/departments/utils/getDepartmentStr.d.ts +1 -0
- package/dist/client/features/departments/utils/getUserListByDepartment.d.ts +1 -0
- package/dist/client/features/embed/EmbedLayout.d.ts +2 -0
- package/dist/client/features/embed/EmbedPage.d.ts +2 -0
- package/dist/client/features/embed/EmbedSchemaComponent.d.ts +2 -0
- package/dist/client/features/embed/NotAuthorityResult.d.ts +2 -0
- package/dist/client/features/embed/index.d.ts +4 -0
- package/dist/client/features/embed/useEmbedToken.d.ts +1 -0
- package/dist/client/features/embed/usePageSettingsProps.d.ts +4 -0
- package/dist/client/features/field-appends/index.d.ts +4 -0
- package/dist/client/features/field-appends/show-code/Code.interface.d.ts +74 -0
- package/dist/client/features/field-appends/show-code/Code.view.d.ts +3 -0
- package/dist/client/features/field-appends/show-formula/Formula.interface.d.ts +75 -0
- package/dist/client/features/field-appends/show-formula/Formula.view.d.ts +3 -0
- package/dist/client/features/hera-version/HeraVersion.provider.d.ts +4 -0
- package/dist/client/features/hera-version/index.d.ts +4 -0
- package/dist/client/features/mode-highlight/ModeHighlight.provider.d.ts +4 -0
- package/dist/client/features/mode-highlight/index.d.ts +4 -0
- package/dist/client/features/outbound/OutboundLinkActionInitializer.d.ts +6 -0
- package/dist/client/features/outbound/OutboundPage.d.ts +2 -0
- package/dist/client/features/outbound/index.d.ts +4 -0
- package/dist/client/features/outbound/useOutboundActionProps.d.ts +3 -0
- package/dist/client/features/pdf/PDFVIewerBlockInitializer.d.ts +10 -0
- package/dist/client/features/pdf/PDFViewer.d.ts +2 -0
- package/dist/client/features/pdf/index.d.ts +4 -0
- package/dist/client/features/sheet/SheetBlockInitializer.d.ts +8 -0
- package/dist/client/features/sheet/index.d.ts +4 -0
- package/dist/client/hooks/useCustomComponent.d.ts +5 -0
- package/dist/client/hooks/useGetCustomAssociatedComponents.d.ts +4 -0
- package/dist/client/hooks/useGetCustomComponents.d.ts +4 -0
- package/dist/client/hooks/useNotifications.d.ts +2 -0
- package/dist/client/hooks/usePluginVersion.d.ts +1 -0
- package/dist/client/hooks/useTokenConfiguration.d.ts +3 -0
- package/dist/client/index.d.ts +16 -0
- package/dist/client/index.js +93 -0
- package/dist/client/interfaces/AssociatedFieldInterface.d.ts +118 -0
- package/dist/client/interfaces/CalcFieldInterface.d.ts +120 -0
- package/dist/client/interfaces/CustomAssociatedFieldInterface.d.ts +69 -0
- package/dist/client/interfaces/CustomFieldInterface.d.ts +45 -0
- package/dist/client/interfaces/ExcelFieldInterface.d.ts +38 -0
- package/dist/client/interfaces/SignaturePadFieldInterface.d.ts +38 -0
- package/dist/client/interfaces/TstzrangeFieldInterface.d.ts +41 -0
- package/dist/client/interfaces/index.d.ts +6 -0
- package/dist/client/locale.d.ts +9 -0
- package/dist/client/schema-initializer/blocks/SettingBlockInitializer.d.ts +2 -0
- package/dist/client/schema-initializer/index.d.ts +1 -0
- package/dist/client/schema-settings/SchemaSettingsDatePickerType.d.ts +2 -0
- package/dist/client/schema-settings/SchemaSettingsDatePresets.d.ts +11 -0
- package/dist/client/schema-settings/SchemaSettingsSubmitDataType.d.ts +5 -0
- package/dist/client/schema-settings/index.d.ts +4 -0
- package/dist/client/settings-manager-components/LinkManager.d.ts +2 -0
- package/dist/client/settings-manager-components/TokenConfiguration.d.ts +6 -0
- package/dist/client/settings-manager-components/index.d.ts +8 -0
- package/dist/client/utils.d.ts +2 -0
- package/dist/externalVersion.js +21 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/locale/en-US.json +94 -0
- package/dist/locale/zh-CN.json +94 -0
- package/dist/node_modules/fs-extra/LICENSE +15 -0
- package/dist/node_modules/fs-extra/lib/copy/copy-sync.js +161 -0
- package/dist/node_modules/fs-extra/lib/copy/copy.js +177 -0
- package/dist/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/dist/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/dist/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/dist/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/dist/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/dist/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/dist/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/dist/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
- package/dist/node_modules/fs-extra/lib/fs/index.js +140 -0
- package/dist/node_modules/fs-extra/lib/index.js +1 -0
- package/dist/node_modules/fs-extra/lib/json/index.js +16 -0
- package/dist/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/dist/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/dist/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/dist/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/dist/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/dist/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/dist/node_modules/fs-extra/lib/move/index.js +7 -0
- package/dist/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/dist/node_modules/fs-extra/lib/move/move.js +59 -0
- package/dist/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/dist/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/dist/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/dist/node_modules/fs-extra/lib/util/stat.js +158 -0
- package/dist/node_modules/fs-extra/lib/util/utimes.js +36 -0
- package/dist/node_modules/fs-extra/package.json +1 -0
- package/dist/server/actions/departments.d.ts +5 -0
- package/dist/server/actions/departments.js +105 -0
- package/dist/server/actions/index.d.ts +7 -0
- package/dist/server/actions/index.js +33 -0
- package/dist/server/actions/link-manager-controller.d.ts +6 -0
- package/dist/server/actions/link-manager-controller.js +133 -0
- package/dist/server/actions/plugin-version.d.ts +6 -0
- package/dist/server/actions/plugin-version.js +91 -0
- package/dist/server/actions/robot-controller.d.ts +5 -0
- package/dist/server/actions/robot-controller.js +134 -0
- package/dist/server/actions/system-message-controller.d.ts +5 -0
- package/dist/server/actions/system-message-controller.js +106 -0
- package/dist/server/actions/token-configuration-controller.d.ts +5 -0
- package/dist/server/actions/token-configuration-controller.js +120 -0
- package/dist/server/actions/users.d.ts +4 -0
- package/dist/server/actions/users.js +142 -0
- package/dist/server/collections/departmentRoles.d.ts +2 -0
- package/dist/server/collections/departmentRoles.js +27 -0
- package/dist/server/collections/departments.d.ts +29 -0
- package/dist/server/collections/departments.js +162 -0
- package/dist/server/collections/departmentsUsers.d.ts +2 -0
- package/dist/server/collections/departmentsUsers.js +43 -0
- package/dist/server/collections/link-manage.d.ts +2 -0
- package/dist/server/collections/link-manage.js +42 -0
- package/dist/server/collections/roles.d.ts +2 -0
- package/dist/server/collections/roles.js +39 -0
- package/dist/server/collections/systemSettings.d.ts +2 -0
- package/dist/server/collections/systemSettings.js +33 -0
- package/dist/server/collections/system_message.d.ts +2 -0
- package/dist/server/collections/system_message.js +67 -0
- package/dist/server/collections/token-configuration.d.ts +2 -0
- package/dist/server/collections/token-configuration.js +54 -0
- package/dist/server/collections/users.d.ts +55 -0
- package/dist/server/collections/users.js +87 -0
- package/dist/server/features/departments.d.ts +7 -0
- package/dist/server/features/departments.js +132 -0
- package/dist/server/fields/calc.d.ts +11 -0
- package/dist/server/fields/calc.js +43 -0
- package/dist/server/fields/tstzrange.d.ts +7 -0
- package/dist/server/fields/tstzrange.js +28 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +41 -0
- package/dist/server/middlewares/destroy-department-check.d.ts +2 -0
- package/dist/server/middlewares/destroy-department-check.js +53 -0
- package/dist/server/middlewares/index.d.ts +6 -0
- package/dist/server/middlewares/index.js +31 -0
- package/dist/server/middlewares/list-users-include-child-department.d.ts +2 -0
- package/dist/server/middlewares/list-users-include-child-department.js +77 -0
- package/dist/server/middlewares/reset-user-departments-cache.d.ts +2 -0
- package/dist/server/middlewares/reset-user-departments-cache.js +39 -0
- package/dist/server/middlewares/set-department-owners.d.ts +2 -0
- package/dist/server/middlewares/set-department-owners.js +74 -0
- package/dist/server/middlewares/set-departments-roles.d.ts +2 -0
- package/dist/server/middlewares/set-departments-roles.js +64 -0
- package/dist/server/middlewares/set-main-department.d.ts +2 -0
- package/dist/server/middlewares/set-main-department.js +105 -0
- package/dist/server/middlewares/update-department-isleaf.d.ts +2 -0
- package/dist/server/middlewares/update-department-isleaf.js +84 -0
- package/dist/server/models/department.d.ts +4 -0
- package/dist/server/models/department.js +38 -0
- package/dist/server/plugin.d.ts +6 -0
- package/dist/server/plugin.js +111 -0
- package/dist/server/services/plugin-version.d.ts +5 -0
- package/dist/server/services/plugin-version.js +89 -0
- package/dist/server/services/sql-loader.d.ts +10 -0
- package/dist/server/services/sql-loader.js +129 -0
- package/dist/server/services/system-setting-service.d.ts +7 -0
- package/dist/server/services/system-setting-service.js +87 -0
- package/dist/server/utils/curren-formula.d.ts +1 -0
- package/dist/server/utils/curren-formula.js +30 -0
- package/dist/server/utils/multiprocess.d.ts +2 -0
- package/dist/server/utils/multiprocess.js +38 -0
- package/package.json +64 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const ownersField: {
|
|
2
|
+
interface: string;
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
collectionName: string;
|
|
6
|
+
target: string;
|
|
7
|
+
through: string;
|
|
8
|
+
foreignKey: string;
|
|
9
|
+
otherKey: string;
|
|
10
|
+
targetKey: string;
|
|
11
|
+
sourceKey: string;
|
|
12
|
+
throughScope: {
|
|
13
|
+
isOwner: boolean;
|
|
14
|
+
};
|
|
15
|
+
uiSchema: {
|
|
16
|
+
type: string;
|
|
17
|
+
title: string;
|
|
18
|
+
'x-component': string;
|
|
19
|
+
'x-component-props': {
|
|
20
|
+
multiple: boolean;
|
|
21
|
+
fieldNames: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
declare const _default: import("@tachybase/database").CollectionOptions;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var departments_exports = {};
|
|
19
|
+
__export(departments_exports, {
|
|
20
|
+
default: () => departments_default,
|
|
21
|
+
ownersField: () => ownersField
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(departments_exports);
|
|
24
|
+
var import_database = require("@tachybase/database");
|
|
25
|
+
const ownersField = {
|
|
26
|
+
interface: "m2m",
|
|
27
|
+
type: "belongsToMany",
|
|
28
|
+
name: "owners",
|
|
29
|
+
collectionName: "departments",
|
|
30
|
+
target: "users",
|
|
31
|
+
through: "departmentsUsers",
|
|
32
|
+
foreignKey: "departmentId",
|
|
33
|
+
otherKey: "userId",
|
|
34
|
+
targetKey: "id",
|
|
35
|
+
sourceKey: "id",
|
|
36
|
+
throughScope: {
|
|
37
|
+
isOwner: true
|
|
38
|
+
},
|
|
39
|
+
uiSchema: {
|
|
40
|
+
type: "m2m",
|
|
41
|
+
title: '{{t("Owners")}}',
|
|
42
|
+
"x-component": "DepartmentOwnersField",
|
|
43
|
+
"x-component-props": {
|
|
44
|
+
multiple: true,
|
|
45
|
+
fieldNames: {
|
|
46
|
+
label: "nickname",
|
|
47
|
+
value: "id"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var departments_default = (0, import_database.defineCollection)({
|
|
53
|
+
name: "departments",
|
|
54
|
+
title: '{{t("Departments")}}',
|
|
55
|
+
dumpRules: "required",
|
|
56
|
+
tree: "adjacency-list",
|
|
57
|
+
template: "tree",
|
|
58
|
+
shared: true,
|
|
59
|
+
sortable: true,
|
|
60
|
+
model: "DepartmentModel",
|
|
61
|
+
createdBy: true,
|
|
62
|
+
updatedBy: true,
|
|
63
|
+
logging: true,
|
|
64
|
+
fields: [
|
|
65
|
+
{
|
|
66
|
+
type: "bigInt",
|
|
67
|
+
name: "id",
|
|
68
|
+
primaryKey: true,
|
|
69
|
+
autoIncrement: true,
|
|
70
|
+
interface: "id",
|
|
71
|
+
uiSchema: {
|
|
72
|
+
type: "number",
|
|
73
|
+
title: '{{t("ID")}}',
|
|
74
|
+
"x-component": "InputNumber",
|
|
75
|
+
"x-read-pretty": true
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: "string",
|
|
80
|
+
name: "title",
|
|
81
|
+
interface: "input",
|
|
82
|
+
uiSchema: {
|
|
83
|
+
type: "string",
|
|
84
|
+
title: '{{t("Department name")}}',
|
|
85
|
+
"x-component": "Input"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: "boolean",
|
|
90
|
+
name: "isLeaf"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: "belongsTo",
|
|
94
|
+
name: "parent",
|
|
95
|
+
target: "departments",
|
|
96
|
+
foreignKey: "parentId",
|
|
97
|
+
treeParent: true,
|
|
98
|
+
onDelete: "CASCADE",
|
|
99
|
+
interface: "m2o",
|
|
100
|
+
uiSchema: {
|
|
101
|
+
type: "m2o",
|
|
102
|
+
title: '{{t("Superior department")}}',
|
|
103
|
+
"x-component": "AssociationField",
|
|
104
|
+
"x-component-props": {
|
|
105
|
+
multiple: false,
|
|
106
|
+
fieldNames: {
|
|
107
|
+
label: "title",
|
|
108
|
+
value: "id"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: "hasMany",
|
|
115
|
+
name: "children",
|
|
116
|
+
target: "departments",
|
|
117
|
+
foreignKey: "parentId",
|
|
118
|
+
treeChildren: true,
|
|
119
|
+
onDelete: "CASCADE"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: "belongsToMany",
|
|
123
|
+
name: "members",
|
|
124
|
+
target: "users",
|
|
125
|
+
through: "departmentsUsers",
|
|
126
|
+
foreignKey: "departmentId",
|
|
127
|
+
otherKey: "userId",
|
|
128
|
+
targetKey: "id",
|
|
129
|
+
sourceKey: "id",
|
|
130
|
+
onDelete: "CASCADE"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
interface: "m2m",
|
|
134
|
+
type: "belongsToMany",
|
|
135
|
+
name: "roles",
|
|
136
|
+
target: "roles",
|
|
137
|
+
through: "departmentsRoles",
|
|
138
|
+
foreignKey: "departmentId",
|
|
139
|
+
otherKey: "roleName",
|
|
140
|
+
targetKey: "name",
|
|
141
|
+
sourceKey: "id",
|
|
142
|
+
onDelete: "CASCADE",
|
|
143
|
+
uiSchema: {
|
|
144
|
+
type: "m2m",
|
|
145
|
+
title: '{{t("Roles")}}',
|
|
146
|
+
"x-component": "AssociationField",
|
|
147
|
+
"x-component-props": {
|
|
148
|
+
multiple: true,
|
|
149
|
+
fieldNames: {
|
|
150
|
+
label: "title",
|
|
151
|
+
value: "name"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
ownersField
|
|
157
|
+
]
|
|
158
|
+
});
|
|
159
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
160
|
+
0 && (module.exports = {
|
|
161
|
+
ownersField
|
|
162
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var departmentsUsers_exports = {};
|
|
19
|
+
__export(departmentsUsers_exports, {
|
|
20
|
+
default: () => departmentsUsers_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(departmentsUsers_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var departmentsUsers_default = (0, import_database.defineCollection)({
|
|
25
|
+
name: "departmentsUsers",
|
|
26
|
+
dumpRules: "required",
|
|
27
|
+
fields: [
|
|
28
|
+
{
|
|
29
|
+
type: "boolean",
|
|
30
|
+
name: "isOwner",
|
|
31
|
+
// Weather the user is the owner of the department
|
|
32
|
+
allowNull: false,
|
|
33
|
+
defaultValue: false
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "boolean",
|
|
37
|
+
name: "isMain",
|
|
38
|
+
// Weather this is the main department of the user
|
|
39
|
+
allowNull: false,
|
|
40
|
+
defaultValue: false
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var link_manage_exports = {};
|
|
19
|
+
__export(link_manage_exports, {
|
|
20
|
+
default: () => link_manage_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(link_manage_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var link_manage_default = (0, import_database.defineCollection)({
|
|
25
|
+
dumpRules: {
|
|
26
|
+
group: "required"
|
|
27
|
+
},
|
|
28
|
+
name: "linkManage",
|
|
29
|
+
title: "\u94FE\u63A5\u7BA1\u7406",
|
|
30
|
+
fields: [
|
|
31
|
+
{
|
|
32
|
+
title: "Name",
|
|
33
|
+
name: "name",
|
|
34
|
+
type: "string"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: "Link",
|
|
38
|
+
name: "link",
|
|
39
|
+
type: "string"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var roles_exports = {};
|
|
19
|
+
__export(roles_exports, {
|
|
20
|
+
default: () => roles_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(roles_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var roles_default = (0, import_database.extendCollection)({
|
|
25
|
+
name: "roles",
|
|
26
|
+
fields: [
|
|
27
|
+
{
|
|
28
|
+
type: "belongsToMany",
|
|
29
|
+
name: "departments",
|
|
30
|
+
target: "departments",
|
|
31
|
+
foreignKey: "roleName",
|
|
32
|
+
otherKey: "departmentId",
|
|
33
|
+
onDelete: "CASCADE",
|
|
34
|
+
sourceKey: "name",
|
|
35
|
+
targetKey: "id",
|
|
36
|
+
through: "departmentsRoles"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var systemSettings_exports = {};
|
|
19
|
+
__export(systemSettings_exports, {
|
|
20
|
+
default: () => systemSettings_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(systemSettings_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var systemSettings_default = (0, import_database.extendCollection)({
|
|
25
|
+
name: "systemSettings",
|
|
26
|
+
fields: [
|
|
27
|
+
{
|
|
28
|
+
type: "json",
|
|
29
|
+
name: "features",
|
|
30
|
+
defaultValue: []
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var system_message_exports = {};
|
|
19
|
+
__export(system_message_exports, {
|
|
20
|
+
default: () => system_message_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(system_message_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var system_message_default = (0, import_database.defineCollection)({
|
|
25
|
+
dumpRules: {
|
|
26
|
+
group: "required"
|
|
27
|
+
},
|
|
28
|
+
name: "system_message",
|
|
29
|
+
title: "\u6D88\u606F\u901A\u77E5",
|
|
30
|
+
createdBy: true,
|
|
31
|
+
updatedBy: true,
|
|
32
|
+
origin: "@tachybase/module-hera",
|
|
33
|
+
fields: [
|
|
34
|
+
{
|
|
35
|
+
title: "\u5DF2\u8BFB",
|
|
36
|
+
name: "read",
|
|
37
|
+
type: "boolean",
|
|
38
|
+
interface: "checkbox",
|
|
39
|
+
parentKey: null,
|
|
40
|
+
reverseKey: null,
|
|
41
|
+
uiSchema: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
"x-component": "Checkbox",
|
|
44
|
+
title: "\u662F\u5426\u542F\u7528(\u52FE\u9009)"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: "\u4EE3\u529E",
|
|
49
|
+
name: "title",
|
|
50
|
+
type: "string"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: "\u5185\u5BB9",
|
|
54
|
+
name: "content",
|
|
55
|
+
type: "string"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
interface: "m2o",
|
|
59
|
+
type: "belongsTo",
|
|
60
|
+
name: "\u7528\u6237",
|
|
61
|
+
target: "users",
|
|
62
|
+
sourceKey: "id",
|
|
63
|
+
foreignKey: "user_id",
|
|
64
|
+
onDelete: "SET NUll"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var token_configuration_exports = {};
|
|
19
|
+
__export(token_configuration_exports, {
|
|
20
|
+
default: () => token_configuration_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(token_configuration_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var token_configuration_default = (0, import_database.defineCollection)({
|
|
25
|
+
dumpRules: {
|
|
26
|
+
group: "required"
|
|
27
|
+
},
|
|
28
|
+
name: "tokenConfiguration",
|
|
29
|
+
title: "\u5F00\u653E\u5E73\u53F0 Token \u7BA1\u7406",
|
|
30
|
+
fields: [
|
|
31
|
+
{
|
|
32
|
+
title: "App ID",
|
|
33
|
+
name: "app_id",
|
|
34
|
+
type: "string"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: "App Secret",
|
|
38
|
+
name: "app_secret",
|
|
39
|
+
type: "string"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: "chat_id",
|
|
43
|
+
comment: "\u6682\u65F6\u8BBE\u7F6E\u5728\u8FD9\u91CC",
|
|
44
|
+
name: "chat_id",
|
|
45
|
+
type: "string"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: "Token Type",
|
|
49
|
+
comment: "\u79D8\u94A5\u7C7B\u578B",
|
|
50
|
+
name: "type",
|
|
51
|
+
type: "string"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const departmentsField: {
|
|
2
|
+
collectionName: string;
|
|
3
|
+
interface: string;
|
|
4
|
+
type: string;
|
|
5
|
+
name: string;
|
|
6
|
+
target: string;
|
|
7
|
+
foreignKey: string;
|
|
8
|
+
otherKey: string;
|
|
9
|
+
onDelete: string;
|
|
10
|
+
sourceKey: string;
|
|
11
|
+
targetKey: string;
|
|
12
|
+
through: string;
|
|
13
|
+
uiSchema: {
|
|
14
|
+
type: string;
|
|
15
|
+
title: string;
|
|
16
|
+
'x-component': string;
|
|
17
|
+
'x-component-props': {
|
|
18
|
+
multiple: boolean;
|
|
19
|
+
fieldNames: {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const mainDepartmentField: {
|
|
27
|
+
collectionName: string;
|
|
28
|
+
interface: string;
|
|
29
|
+
type: string;
|
|
30
|
+
name: string;
|
|
31
|
+
target: string;
|
|
32
|
+
foreignKey: string;
|
|
33
|
+
otherKey: string;
|
|
34
|
+
onDelete: string;
|
|
35
|
+
sourceKey: string;
|
|
36
|
+
targetKey: string;
|
|
37
|
+
through: string;
|
|
38
|
+
throughScope: {
|
|
39
|
+
isMain: boolean;
|
|
40
|
+
};
|
|
41
|
+
uiSchema: {
|
|
42
|
+
type: string;
|
|
43
|
+
title: string;
|
|
44
|
+
'x-component': string;
|
|
45
|
+
'x-component-props': {
|
|
46
|
+
multiple: boolean;
|
|
47
|
+
fieldNames: {
|
|
48
|
+
label: string;
|
|
49
|
+
value: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
declare const _default: import("@tachybase/database").CollectionDef;
|
|
55
|
+
export default _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var users_exports = {};
|
|
19
|
+
__export(users_exports, {
|
|
20
|
+
default: () => users_default,
|
|
21
|
+
departmentsField: () => departmentsField,
|
|
22
|
+
mainDepartmentField: () => mainDepartmentField
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(users_exports);
|
|
25
|
+
var import_database = require("@tachybase/database");
|
|
26
|
+
const departmentsField = {
|
|
27
|
+
collectionName: "users",
|
|
28
|
+
interface: "m2m",
|
|
29
|
+
type: "belongsToMany",
|
|
30
|
+
name: "departments",
|
|
31
|
+
target: "departments",
|
|
32
|
+
foreignKey: "userId",
|
|
33
|
+
otherKey: "departmentId",
|
|
34
|
+
onDelete: "CASCADE",
|
|
35
|
+
sourceKey: "id",
|
|
36
|
+
targetKey: "id",
|
|
37
|
+
through: "departmentsUsers",
|
|
38
|
+
uiSchema: {
|
|
39
|
+
type: "m2m",
|
|
40
|
+
title: '{{t("Departments")}}',
|
|
41
|
+
"x-component": "UserDepartmentsField",
|
|
42
|
+
"x-component-props": {
|
|
43
|
+
multiple: true,
|
|
44
|
+
fieldNames: {
|
|
45
|
+
label: "title",
|
|
46
|
+
value: "name"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const mainDepartmentField = {
|
|
52
|
+
collectionName: "users",
|
|
53
|
+
interface: "m2m",
|
|
54
|
+
type: "belongsToMany",
|
|
55
|
+
name: "mainDepartment",
|
|
56
|
+
target: "departments",
|
|
57
|
+
foreignKey: "userId",
|
|
58
|
+
otherKey: "departmentId",
|
|
59
|
+
onDelete: "CASCADE",
|
|
60
|
+
sourceKey: "id",
|
|
61
|
+
targetKey: "id",
|
|
62
|
+
through: "departmentsUsers",
|
|
63
|
+
throughScope: {
|
|
64
|
+
isMain: true
|
|
65
|
+
},
|
|
66
|
+
uiSchema: {
|
|
67
|
+
type: "m2m",
|
|
68
|
+
title: '{{t("Main department")}}',
|
|
69
|
+
"x-component": "UserMainDepartmentField",
|
|
70
|
+
"x-component-props": {
|
|
71
|
+
multiple: false,
|
|
72
|
+
fieldNames: {
|
|
73
|
+
label: "title",
|
|
74
|
+
value: "name"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var users_default = (0, import_database.extendCollection)({
|
|
80
|
+
name: "users",
|
|
81
|
+
fields: [departmentsField, mainDepartmentField]
|
|
82
|
+
});
|
|
83
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
84
|
+
0 && (module.exports = {
|
|
85
|
+
departmentsField,
|
|
86
|
+
mainDepartmentField
|
|
87
|
+
});
|