@addsign/moje-agenda-shared-lib 0.0.86 → 0.0.87
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/dist/assets/tailwind.css +5 -2
- package/dist/components/Button.js +1 -1
- package/dist/components/Button.js.map +1 -1
- package/dist/components/datatable/DataTableServer.js +2 -2
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/form/InputField.js +8 -6
- package/dist/components/form/InputField.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -45,11 +45,13 @@ function InputField({
|
|
|
45
45
|
ref.current.focus();
|
|
46
46
|
};
|
|
47
47
|
useClickAway(wrapperRef, () => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
if (isFocused) {
|
|
49
|
+
setIsFocused(false);
|
|
50
|
+
console.log(
|
|
51
|
+
"%clibcomponents\formInputField.tsx:54 clickaway",
|
|
52
|
+
"color: #007acc;"
|
|
53
|
+
);
|
|
54
|
+
}
|
|
53
55
|
});
|
|
54
56
|
const hangleChange = (e) => {
|
|
55
57
|
onInputChange(e);
|
|
@@ -115,7 +117,7 @@ function InputField({
|
|
|
115
117
|
${isFocused ? "outline-4 outline-indigo-200 outline-offset-0 border-indigo-300 " : ""}`,
|
|
116
118
|
onClick: handleSetFocus,
|
|
117
119
|
children: [
|
|
118
|
-
/* @__PURE__ */ jsx("div", { className: "grow shrink basis-0 min-h-
|
|
120
|
+
/* @__PURE__ */ jsx("div", { className: "grow shrink basis-0 min-h-[32px] justify-start items-center gap-0 flex whitespace-nowrap w-[calc(100%-40px)] ", children: renderInput() }),
|
|
119
121
|
value && /* @__PURE__ */ jsxs(
|
|
120
122
|
"div",
|
|
121
123
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.js","sources":["../../../lib/components/form/InputField.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport { IFormFieldGlobalProps } from \"../../types\";\r\nimport { MdClose } from \"react-icons/md\";\r\nimport { useClickAway } from \"react-use\";\r\n\r\nexport interface IInputFieldProps extends IFormFieldGlobalProps {\r\n maxLength?: number;\r\n}\r\n\r\nexport default function InputField({\r\n label,\r\n name,\r\n value,\r\n description,\r\n onInputChange,\r\n placeholder,\r\n className,\r\n register,\r\n type,\r\n disabled,\r\n maxLength,\r\n errors = {},\r\n}: IInputFieldProps) {\r\n const wrapperRef = React.useRef(null);\r\n const [isFocused, setIsFocused] = React.useState(false);\r\n const handleClear = (e: any) => {\r\n value;\r\n onInputChange({\r\n ...e,\r\n target: {\r\n value: \"\",\r\n name: name,\r\n },\r\n });\r\n };\r\n const fallbackRef = React.useRef(null);\r\n const {\r\n ref: registeredRef = fallbackRef,\r\n onBlur: formOnBlur = () => {} /* default function */,\r\n ...rest\r\n } = register ? register(name) : {};\r\n\r\n const ref = registeredRef || fallbackRef;\r\n const handleSetFocus = () => {\r\n console.log(\r\n \"%clibcomponents\\formInputField.tsx:44 handleSetFocus\",\r\n \"color: #007acc;\"\r\n );\r\n setIsFocused(true);\r\n ref.current.focus();\r\n };\r\n useClickAway(wrapperRef, () => {\r\n console.log(\r\n
|
|
1
|
+
{"version":3,"file":"InputField.js","sources":["../../../lib/components/form/InputField.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport { IFormFieldGlobalProps } from \"../../types\";\r\nimport { MdClose } from \"react-icons/md\";\r\nimport { useClickAway } from \"react-use\";\r\n\r\nexport interface IInputFieldProps extends IFormFieldGlobalProps {\r\n maxLength?: number;\r\n}\r\n\r\nexport default function InputField({\r\n label,\r\n name,\r\n value,\r\n description,\r\n onInputChange,\r\n placeholder,\r\n className,\r\n register,\r\n type,\r\n disabled,\r\n maxLength,\r\n errors = {},\r\n}: IInputFieldProps) {\r\n const wrapperRef = React.useRef(null);\r\n const [isFocused, setIsFocused] = React.useState(false);\r\n const handleClear = (e: any) => {\r\n value;\r\n onInputChange({\r\n ...e,\r\n target: {\r\n value: \"\",\r\n name: name,\r\n },\r\n });\r\n };\r\n const fallbackRef = React.useRef(null);\r\n const {\r\n ref: registeredRef = fallbackRef,\r\n onBlur: formOnBlur = () => {} /* default function */,\r\n ...rest\r\n } = register ? register(name) : {};\r\n\r\n const ref = registeredRef || fallbackRef;\r\n const handleSetFocus = () => {\r\n console.log(\r\n \"%clibcomponents\\formInputField.tsx:44 handleSetFocus\",\r\n \"color: #007acc;\"\r\n );\r\n setIsFocused(true);\r\n ref.current.focus();\r\n };\r\n useClickAway(wrapperRef, () => {\r\n if (isFocused) {\r\n setIsFocused(false);\r\n console.log(\r\n \"%clibcomponents\\formInputField.tsx:54 clickaway\",\r\n \"color: #007acc;\"\r\n );\r\n }\r\n });\r\n\r\n const hangleChange = (e: any) => {\r\n onInputChange(e);\r\n setIsFocused(false);\r\n };\r\n\r\n const renderInput = () => {\r\n switch (type) {\r\n case \"textarea\":\r\n return (\r\n <textarea\r\n id={name}\r\n className=\"grow shrink basis-0 text-gray-900 text-sm font-normal leading-tight focus:border-none \"\r\n disabled={disabled}\r\n value={value || \"\"}\r\n rows={3}\r\n {...rest} // Spread the rest of register's return value\r\n ref={ref}\r\n onChange={(e) => hangleChange(e)}\r\n onFocus={() => setIsFocused(true)}\r\n maxLength={maxLength || 4000}\r\n // Combine custom onBlur with form's onBlur\r\n onBlur={(e) => {\r\n formOnBlur(e); // Call React Hook Form's onBlur\r\n setIsFocused(false); // Then call your custom onBlur logic\r\n }}\r\n />\r\n );\r\n default:\r\n return (\r\n <>\r\n <input\r\n className=\"text-gray-900 text-sm font-normal leading-normal text-ellipsis overflow-hidden w-full\"\r\n id={name}\r\n readOnly={disabled}\r\n value={value || \"\"}\r\n type={type}\r\n {...rest} // Spread the rest of register's return value\r\n ref={ref}\r\n placeholder={placeholder}\r\n onChange={(e) => hangleChange(e)}\r\n onFocus={() => setIsFocused(true)}\r\n // Combine custom onBlur with form's onBlur\r\n onBlur={(e) => {\r\n formOnBlur(e); // Call React Hook Form's onBlur\r\n setIsFocused(false); // Then call your custom onBlur logic\r\n }}\r\n />\r\n </>\r\n );\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n <div\r\n className={\r\n \"min-h-30 flex-col justify-start items-start gap-1.5 w-full relative \" +\r\n className\r\n }\r\n ref={wrapperRef}\r\n id=\"component\"\r\n >\r\n <div className=\"self-stretch flex-col justify-start items-start gap-1.5 flex\">\r\n {label && (\r\n <div className=\"text-slate-700 text-sm font-medium leading-tight\">\r\n {label}\r\n </div>\r\n )}\r\n <div\r\n className={`self-stretch w-full px-3 py-1 bg-white rounded-lg border justify-start items-center gap-0 inline-flex outline-none \r\n ${isFocused ? \"outline-4 outline-indigo-200 outline-offset-0 border-indigo-300 \" : \"\"}`}\r\n onClick={handleSetFocus}\r\n >\r\n <div className=\"grow shrink basis-0 min-h-[32px] justify-start items-center gap-0 flex whitespace-nowrap w-[calc(100%-40px)] \">\r\n {renderInput()}\r\n </div>\r\n {value && (\r\n <div\r\n className=\"w-6 h-6 relative cursor-pointer \"\r\n onClick={handleClear}\r\n >\r\n <div className=\"absolute inset-0 flex items-center justify-center hover:bg-gray-100 w-6 rounded-full text-lg\">\r\n <MdClose />\r\n </div>{\" \"}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n {description && !isFocused && (\r\n <div className=\"self-stretch text-slate-600 text-sm font-normal leading-tight\">\r\n {description}\r\n </div>\r\n )}{\" \"}\r\n {errors[name] && (\r\n <div className=\"HintText self-stretch text-red-600 text-sm font-normal leading-tight\">\r\n {errors[name]?.message}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n );\r\n}\r\n"],"names":[],"mappings":";;;;AASA,SAAwB,WAAW;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,CAAC;AACZ,GAAqB;;AACb,QAAA,aA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AAO,IAAI,MAAX,mBAAc,QACjB,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ;"}
|
package/dist/types.d.ts
CHANGED
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../lib/types.ts"],"sourcesContent":["import { AxiosInstance } from \"axios\";\r\nimport { Emitter } from \"mitt\";\r\n\r\n\r\nimport { UseFormReturn } from \"react-hook-form\";\r\n\r\nexport interface IUserInfo {\r\n contractGroup: number;\r\n degreeAfter: string;\r\n degreeBefore: string;\r\n departmentId: string;\r\n departmentName: string;\r\n departmentNameLong: string;\r\n email: string;\r\n employeeId: number;\r\n firstName: string;\r\n lastName: string;\r\n positionName: string;\r\n positionNumber: string;\r\n userId: string;\r\n}\r\nexport interface IEmployee extends IUserInfo {\r\n\r\n deleted: boolean\r\n hasComputer: string\r\n language: string\r\n manager: string\r\n parentFrId: number\r\n positionId: number\r\n validFrom: string\r\n validTo: string\r\n contractType: number\r\n exemption: number\r\n activatedOn: string\r\n}\r\n\r\nexport type IAuthApps = string[];\r\n\r\nexport interface IEventMessage {\r\n title?: string;\r\n message?: string;\r\n timeout?: number;\r\n classes?: string;\r\n}\r\n\r\nexport type Events = {\r\n message?: IEventMessage;\r\n loading?: boolean;\r\n};\r\n\r\nexport interface IContextValue {\r\n userInfo: IUserInfo;\r\n apiClient: AxiosInstance;\r\n authApps: IAuthApps;\r\n emitter: Emitter<Events>;\r\n}\r\nexport interface IOptionItem {\r\n value: string | number | null;\r\n label: string;\r\n description?: string;\r\n}\r\n\r\nexport type IFormProps = {\r\n formName: string;\r\n entityId: string;\r\n entityName: string;\r\n context: IContextValue;\r\n onSuccess: (path: string, message?: string) => void;\r\n};\r\nexport type IListProps = {\r\n id?: string;\r\n listName: string;\r\n filters: object; //{ [key: string]: any };\r\n context: IContextValue;\r\n title?: string;\r\n};\r\n\r\nexport type IStartProcessProps = {\r\n context: IContextValue;\r\n\r\n onNavigate: (path: string) => void;\r\n};\r\n\r\nexport interface IModuleProcess {\r\n\r\n key: string;\r\n name: string;\r\n description: string;\r\n\r\n}\r\nexport interface IModuleConstants {\r\n\r\n name: string\r\n processes: IModuleProcess[]\r\n}\r\n\r\n\r\nexport interface IPosition {\r\n id: number;\r\n departmentId: string;\r\n positionName: string;\r\n positionNumber: string;\r\n manager: string;\r\n virtual: boolean;\r\n title: string;\r\n}\r\nexport interface IPositionEmployee extends IPosition {\r\n employee: IEmployee;\r\n}\r\nexport interface IEmployeePosition extends IEmployee {\r\n position: IPosition;\r\n}\r\nexport type { ICalendarItem } from \"./components/Calendar\";\r\n\r\n\r\nexport interface ITimeOffCategoryDto {\r\n id?: number;\r\n name?: string;\r\n}\r\nexport interface ITimeOffData {\r\n id: number;\r\n startDate: string;\r\n endDate: string;\r\n days?: number;\r\n year?: number;\r\n comment?: string;\r\n applicant?: IEmployee;\r\n place?: string;\r\n leaveType?: string;\r\n initiator?: string;\r\n dateFromEvidence?: string;\r\n dateToEvidence?: string;\r\n status?: number;\r\n statusText?: string;\r\n timeOffCategoryDto: ITimeOffCategoryDto;\r\n applicantContractGroup?: number;\r\n name?: string;\r\n daysOfEvidence?: number;\r\n daysInStartMonth?: number;\r\n daysInEndMonth?: number;\r\n lastChange?: string;\r\n created?: string;\r\n updated?: string;\r\n attachment?: IAttachment;\r\n steps?: IStep[];\r\n}\r\n\r\nexport interface IDepartment {\r\n departmentId: string;\r\n nameLong: string;\r\n parentDepartmentId: string;\r\n parentLocationId: number;\r\n nameShort: string;\r\n}\r\n\r\nexport interface IPageable<T> {\r\n content: T[];\r\n empty: boolean;\r\n first: boolean;\r\n last: boolean;\r\n number: number;\r\n numberOfElements: number;\r\n size: number;\r\n totalElements: number;\r\n totalPages: number;\r\n}\r\n\r\n\r\nexport interface IFormFieldGlobalProps {\r\n label?: string;\r\n description?: string;\r\n name: string;\r\n type?: string;\r\n value?: any;\r\n\r\n methods?: UseFormReturn<any>;\r\n\r\n errors?: any;\r\n register?: any;\r\n disabled?: boolean;\r\n required?: boolean;\r\n clearable?: boolean;\r\n placeholder?: string;\r\n children?: React.ReactNode;\r\n className?: string;\r\n\r\n onInputChange: (\r\n e: React.ChangeEvent<\r\n HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | any\r\n >\r\n ) => void;\r\n}\r\n\r\n\r\nexport interface SysConfigHolidayEntityResponse {\r\n \"id\": number,\r\n \"date\": string,\r\n \"day\": number,\r\n \"month\": number,\r\n \"year\": number,\r\n \"dayOfWeek\": number\r\n}\r\n\r\n\r\nexport interface IProfileApprover {\r\n id: number;\r\n role: number;\r\n roleTxt: string;\r\n approverOrder: number;\r\n approver: IEmployee;\r\n position: IPositionEmployee;\r\n isEmployee: boolean;\r\n ignore: boolean;\r\n makePreapprover: boolean;\r\n}\r\n\r\n\r\nexport enum EApproverRoles {\r\n predschvalovatel = 10,\r\n zastupce = 20,\r\n zastupce9 = 30,\r\n vedouci = 40,\r\n vyssiSchvalovatel = 60,\r\n vyssiSchvalovatelZastupce = 61,\r\n vyssiSchvalovatelZastupce9 = 62,\r\n dochazkovyVedouci = 90,\r\n}\r\nexport enum EApproverTypes {\r\n vyssiSchvalovatel = \"vyssiSchvalovatel\",\r\n vyssiSchvalovatelZastupce = \"vyssiSchvalovatelZastupce\",\r\n vyssiSchvalovatelZastupce9 = \"vyssiSchvalovatelZastupce9\",\r\n vedouci = \"vedouci\",\r\n zastupce9 = \"zastupce9\",\r\n zastupce = \"zastupce\",\r\n predschvalovatel1 = \"predschvalovatel1\",\r\n predschvalovatel2 = \"predschvalovatel2\",\r\n predschvalovatel3 = \"predschvalovatel3\",\r\n dochazkovyVedouci = \"dochazkovyVedouci\",\r\n}\r\n\r\nexport interface IAttachment {\r\n\r\n\r\n id: number;\r\n created: string;\r\n createdByEmpId: string;\r\n updated: string;\r\n updatedByEmpId: string;\r\n mimeType: string;\r\n size: number;\r\n filename: string;\r\n\r\n}\r\n\r\n\r\n\r\nexport interface IStep {\r\n\r\n\r\n date: string;\r\n type: number;\r\n comment: string;\r\n decision: string;\r\n employee: IEmployee;\r\n\r\n}\r\n\r\n\r\nexport enum EDecisionsTranslations {\r\n approved = 'Schváleno',\r\n rejected = 'Zamítnuto',\r\n cancelled = 'Stornováno',\r\n evided = 'Zaevidováno',\r\n}\r\n\r\n\r\nexport interface ProcessDefinitionDto {\r\n /**\r\n * The id of the process definition\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n id?: string | null;\r\n\r\n /**\r\n * The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n key?: string | null;\r\n\r\n /**\r\n * The category of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n category?: string | null;\r\n\r\n /**\r\n * The description of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n description?: string | null;\r\n\r\n /**\r\n * The name of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n name?: string | null;\r\n\r\n /**\r\n * The version of the process definition that the engine assigned to it.\r\n *\r\n * @type {number}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n version?: number | null;\r\n\r\n /**\r\n * The file name of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n resource?: string | null;\r\n\r\n /**\r\n * The deployment id of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n deploymentId?: string | null;\r\n\r\n /**\r\n * The file name of the process definition diagram, if it exists.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n diagram?: string | null;\r\n\r\n /**\r\n * A flag indicating whether the definition is suspended or not.\r\n *\r\n * @type {boolean}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n suspended?: boolean | null;\r\n\r\n /**\r\n * The tenant id of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n tenantId?: string | null;\r\n\r\n /**\r\n * The version tag of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n versionTag?: string | null;\r\n\r\n /**\r\n * History time to live value of the process definition. Is used within [History cleanup](https://docs.camunda.org/manual/7.20/user-guide/process-engine/history/#history-cleanup).\r\n *\r\n * @type {number}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n historyTimeToLive?: number | null;\r\n\r\n /**\r\n * A flag indicating whether the process definition is startable in Tasklist or not.\r\n *\r\n * @type {boolean}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n startableInTasklist?: boolean | null;\r\n}"],"names":["EApproverRoles","EApproverTypes","EDecisionsTranslations"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../lib/types.ts"],"sourcesContent":["import { AxiosInstance } from \"axios\";\r\nimport { Emitter } from \"mitt\";\r\n\r\n\r\nimport { UseFormReturn } from \"react-hook-form\";\r\n\r\nexport interface IUserInfo {\r\n contractGroup: number;\r\n degreeAfter: string;\r\n degreeBefore: string;\r\n departmentId: string;\r\n departmentName: string;\r\n departmentNameLong: string;\r\n email: string;\r\n employeeId: number;\r\n firstName: string;\r\n lastName: string;\r\n positionName: string;\r\n positionNumber: string;\r\n userId: string;\r\n}\r\nexport interface IEmployee extends IUserInfo {\r\n\r\n deleted: boolean\r\n hasComputer: string\r\n language: string\r\n manager: string\r\n parentFrId: number\r\n positionId: number\r\n validFrom: string\r\n validTo: string\r\n contractType: number\r\n exemption: number\r\n activatedOn: string\r\n}\r\n\r\nexport type IAuthApps = string[];\r\n\r\nexport interface IEventMessage {\r\n title?: string;\r\n message?: string;\r\n timeout?: number;\r\n classes?: string;\r\n}\r\n\r\nexport type Events = {\r\n message?: IEventMessage;\r\n loading?: boolean;\r\n};\r\n\r\nexport interface IContextValue {\r\n userInfo: IUserInfo;\r\n apiClient: AxiosInstance;\r\n authApps: IAuthApps;\r\n emitter: Emitter<Events>;\r\n}\r\nexport interface IOptionItem {\r\n value: string | number | null;\r\n label: string;\r\n description?: string;\r\n}\r\n\r\nexport type IFormProps = {\r\n formName: string;\r\n entityId: string;\r\n entityName: string;\r\n context: IContextValue;\r\n onSuccess: (path: string, message?: string) => void;\r\n};\r\nexport type IListProps = {\r\n id?: string;\r\n listName: string;\r\n filters: object; //{ [key: string]: any };\r\n context: IContextValue;\r\n title?: string;\r\n};\r\n\r\nexport type IStartProcessProps = {\r\n context: IContextValue;\r\n\r\n onNavigate: (path: string) => void;\r\n};\r\n\r\nexport interface IModuleProcess {\r\n\r\n key: string;\r\n name: string;\r\n description: string;\r\n disabled?: boolean;\r\n\r\n}\r\nexport interface IModuleConstants {\r\n\r\n name: string\r\n processes: IModuleProcess[]\r\n}\r\n\r\n\r\nexport interface IPosition {\r\n id: number;\r\n departmentId: string;\r\n positionName: string;\r\n positionNumber: string;\r\n manager: string;\r\n virtual: boolean;\r\n title: string;\r\n}\r\nexport interface IPositionEmployee extends IPosition {\r\n employee: IEmployee;\r\n}\r\nexport interface IEmployeePosition extends IEmployee {\r\n position: IPosition;\r\n}\r\nexport type { ICalendarItem } from \"./components/Calendar\";\r\n\r\n\r\nexport interface ITimeOffCategoryDto {\r\n id?: number;\r\n name?: string;\r\n}\r\nexport interface ITimeOffData {\r\n id: number;\r\n startDate: string;\r\n endDate: string;\r\n days?: number;\r\n year?: number;\r\n comment?: string;\r\n applicant?: IEmployee;\r\n place?: string;\r\n leaveType?: string;\r\n initiator?: string;\r\n dateFromEvidence?: string;\r\n dateToEvidence?: string;\r\n status?: number;\r\n statusText?: string;\r\n timeOffCategoryDto: ITimeOffCategoryDto;\r\n applicantContractGroup?: number;\r\n name?: string;\r\n daysOfEvidence?: number;\r\n daysInStartMonth?: number;\r\n daysInEndMonth?: number;\r\n lastChange?: string;\r\n created?: string;\r\n updated?: string;\r\n attachment?: IAttachment;\r\n steps?: IStep[];\r\n}\r\n\r\nexport interface IDepartment {\r\n departmentId: string;\r\n nameLong: string;\r\n parentDepartmentId: string;\r\n parentLocationId: number;\r\n nameShort: string;\r\n}\r\n\r\nexport interface IPageable<T> {\r\n content: T[];\r\n empty: boolean;\r\n first: boolean;\r\n last: boolean;\r\n number: number;\r\n numberOfElements: number;\r\n size: number;\r\n totalElements: number;\r\n totalPages: number;\r\n}\r\n\r\n\r\nexport interface IFormFieldGlobalProps {\r\n label?: string;\r\n description?: string;\r\n name: string;\r\n type?: string;\r\n value?: any;\r\n\r\n methods?: UseFormReturn<any>;\r\n\r\n errors?: any;\r\n register?: any;\r\n disabled?: boolean;\r\n required?: boolean;\r\n clearable?: boolean;\r\n placeholder?: string;\r\n children?: React.ReactNode;\r\n className?: string;\r\n\r\n onInputChange: (\r\n e: React.ChangeEvent<\r\n HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | any\r\n >\r\n ) => void;\r\n}\r\n\r\n\r\nexport interface SysConfigHolidayEntityResponse {\r\n \"id\": number,\r\n \"date\": string,\r\n \"day\": number,\r\n \"month\": number,\r\n \"year\": number,\r\n \"dayOfWeek\": number\r\n}\r\n\r\n\r\nexport interface IProfileApprover {\r\n id: number;\r\n role: number;\r\n roleTxt: string;\r\n approverOrder: number;\r\n approver: IEmployee;\r\n position: IPositionEmployee;\r\n isEmployee: boolean;\r\n ignore: boolean;\r\n makePreapprover: boolean;\r\n}\r\n\r\n\r\nexport enum EApproverRoles {\r\n predschvalovatel = 10,\r\n zastupce = 20,\r\n zastupce9 = 30,\r\n vedouci = 40,\r\n vyssiSchvalovatel = 60,\r\n vyssiSchvalovatelZastupce = 61,\r\n vyssiSchvalovatelZastupce9 = 62,\r\n dochazkovyVedouci = 90,\r\n}\r\nexport enum EApproverTypes {\r\n vyssiSchvalovatel = \"vyssiSchvalovatel\",\r\n vyssiSchvalovatelZastupce = \"vyssiSchvalovatelZastupce\",\r\n vyssiSchvalovatelZastupce9 = \"vyssiSchvalovatelZastupce9\",\r\n vedouci = \"vedouci\",\r\n zastupce9 = \"zastupce9\",\r\n zastupce = \"zastupce\",\r\n predschvalovatel1 = \"predschvalovatel1\",\r\n predschvalovatel2 = \"predschvalovatel2\",\r\n predschvalovatel3 = \"predschvalovatel3\",\r\n dochazkovyVedouci = \"dochazkovyVedouci\",\r\n}\r\n\r\nexport interface IAttachment {\r\n\r\n\r\n id: number;\r\n created: string;\r\n createdByEmpId: string;\r\n updated: string;\r\n updatedByEmpId: string;\r\n mimeType: string;\r\n size: number;\r\n filename: string;\r\n\r\n}\r\n\r\n\r\n\r\nexport interface IStep {\r\n\r\n\r\n date: string;\r\n type: number;\r\n comment: string;\r\n decision: string;\r\n employee: IEmployee;\r\n\r\n}\r\n\r\n\r\nexport enum EDecisionsTranslations {\r\n approved = 'Schváleno',\r\n rejected = 'Zamítnuto',\r\n cancelled = 'Stornováno',\r\n evided = 'Zaevidováno',\r\n}\r\n\r\n\r\nexport interface ProcessDefinitionDto {\r\n /**\r\n * The id of the process definition\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n id?: string | null;\r\n\r\n /**\r\n * The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n key?: string | null;\r\n\r\n /**\r\n * The category of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n category?: string | null;\r\n\r\n /**\r\n * The description of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n description?: string | null;\r\n\r\n /**\r\n * The name of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n name?: string | null;\r\n\r\n /**\r\n * The version of the process definition that the engine assigned to it.\r\n *\r\n * @type {number}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n version?: number | null;\r\n\r\n /**\r\n * The file name of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n resource?: string | null;\r\n\r\n /**\r\n * The deployment id of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n deploymentId?: string | null;\r\n\r\n /**\r\n * The file name of the process definition diagram, if it exists.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n diagram?: string | null;\r\n\r\n /**\r\n * A flag indicating whether the definition is suspended or not.\r\n *\r\n * @type {boolean}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n suspended?: boolean | null;\r\n\r\n /**\r\n * The tenant id of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n tenantId?: string | null;\r\n\r\n /**\r\n * The version tag of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n versionTag?: string | null;\r\n\r\n /**\r\n * History time to live value of the process definition. Is used within [History cleanup](https://docs.camunda.org/manual/7.20/user-guide/process-engine/history/#history-cleanup).\r\n *\r\n * @type {number}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n historyTimeToLive?: number | null;\r\n\r\n /**\r\n * A flag indicating whether the process definition is startable in Tasklist or not.\r\n *\r\n * @type {boolean}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n startableInTasklist?: boolean | null;\r\n}"],"names":["EApproverRoles","EApproverTypes","EDecisionsTranslations"],"mappings":"AA0NY,IAAA,mCAAAA,oBAAL;AACLA,kBAAAA,gBAAA,sBAAmB,EAAnB,IAAA;AACAA,kBAAAA,gBAAA,cAAW,EAAX,IAAA;AACAA,kBAAAA,gBAAA,eAAY,EAAZ,IAAA;AACAA,kBAAAA,gBAAA,aAAU,EAAV,IAAA;AACAA,kBAAAA,gBAAA,uBAAoB,EAApB,IAAA;AACAA,kBAAAA,gBAAA,+BAA4B,EAA5B,IAAA;AACAA,kBAAAA,gBAAA,gCAA6B,EAA7B,IAAA;AACAA,kBAAAA,gBAAA,uBAAoB,EAApB,IAAA;AARUA,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAUA,IAAA,mCAAAC,oBAAL;AACLA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,2BAA4B,IAAA;AAC5BA,kBAAA,4BAA6B,IAAA;AAC7BA,kBAAA,SAAU,IAAA;AACVA,kBAAA,WAAY,IAAA;AACZA,kBAAA,UAAW,IAAA;AACXA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AAVVA,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAyCA,IAAA,2CAAAC,4BAAL;AACLA,0BAAA,UAAW,IAAA;AACXA,0BAAA,UAAW,IAAA;AACXA,0BAAA,WAAY,IAAA;AACZA,0BAAA,QAAS,IAAA;AAJCA,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;"}
|