@redneckz/wildless-cms-uni-blocks 0.14.707 → 0.14.709
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/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/bundle/bundle.umd.js +25 -12
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/DraftDialog/DraftActionButton.d.ts +2 -1
- package/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/dist/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/dist/ui-kit/DraftDialog/DraftActionButton.d.ts +2 -1
- package/dist/ui-kit/DraftDialog/DraftActionButton.js +1 -1
- package/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
- package/dist/ui-kit/DraftDialog/DraftDialog.js +1 -1
- package/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/dist/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/lib/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/lib/ui-kit/DraftDialog/DraftActionButton.d.ts +2 -1
- package/lib/ui-kit/DraftDialog/DraftActionButton.js +1 -1
- package/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
- package/lib/ui-kit/DraftDialog/DraftDialog.js +1 -1
- package/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/lib/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +25 -12
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/DraftDialog/DraftActionButton.d.ts +2 -1
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.d.ts +2 -1
- package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js +1 -1
- package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js +1 -1
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.d.ts +2 -1
- package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js +1 -1
- package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js +1 -1
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/src/api/RetailAPI/utils/getOrganizationParams.ts +9 -3
- package/mobile/src/ui-kit/DraftDialog/DraftActionButton.tsx +3 -2
- package/mobile/src/ui-kit/DraftDialog/DraftDialog.tsx +2 -2
- package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +16 -15
- package/package.json +1 -1
- package/src/api/RetailAPI/utils/getOrganizationParams.ts +9 -3
- package/src/ui-kit/DraftDialog/DraftActionButton.tsx +3 -2
- package/src/ui-kit/DraftDialog/DraftDialog.tsx +2 -2
- package/src/ui-kit/FormField/updateOrganizationFields.ts +16 -15
|
@@ -6,7 +6,7 @@ export declare const getOrganizationActivityType: (options: LeadProps[], okved:
|
|
|
6
6
|
export declare const getEmployeesNumberOption: (options: LeadProps[] | null, count?: number) => {
|
|
7
7
|
key: string;
|
|
8
8
|
text: string;
|
|
9
|
-
};
|
|
9
|
+
} | null;
|
|
10
10
|
export declare const getOrganizationKind: (options: LeadProps[], okopf: number) => {
|
|
11
11
|
key: string;
|
|
12
12
|
text: string;
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -3797,7 +3797,10 @@
|
|
|
3797
3797
|
}
|
|
3798
3798
|
};
|
|
3799
3799
|
const getEmployeesNumberOption = (options, count) => {
|
|
3800
|
-
|
|
3800
|
+
if (!count) {
|
|
3801
|
+
return null;
|
|
3802
|
+
}
|
|
3803
|
+
const [option] = [options?.find((_) => count <= Number(_.description))].map((_) => ({
|
|
3801
3804
|
key: _?.key ?? '',
|
|
3802
3805
|
text: _?.value ?? '',
|
|
3803
3806
|
}));
|
|
@@ -3823,19 +3826,29 @@
|
|
|
3823
3826
|
}
|
|
3824
3827
|
return getOptionByKey('COMMERCIAL');
|
|
3825
3828
|
};
|
|
3826
|
-
const getOptionOp = (options) => (key) => options
|
|
3829
|
+
const getOptionOp = (options) => (key) => options
|
|
3830
|
+
.map((_) => ({ key: _.key, text: _.value }))
|
|
3831
|
+
.find((_) => _.key === key) ?? null;
|
|
3827
3832
|
|
|
3828
3833
|
const updateOrganizationFields = (store, field, item) => {
|
|
3829
|
-
const inn = item
|
|
3830
|
-
const okopf = Number(item.data?.opf?.code);
|
|
3831
|
-
const okved = item.data?.okved ?? '';
|
|
3834
|
+
const { okved, okopf, inn } = getOrganizationRequisites(item);
|
|
3832
3835
|
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
3833
3836
|
field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3837
|
+
const organizationData = {
|
|
3838
|
+
amountWorkers: getEmployeesNumberOption(store?.amountWorkers, item.data?.employee_count),
|
|
3839
|
+
employerActivities: getOrganizationActivityType(store?.employerActivities ?? [], okved),
|
|
3840
|
+
organization: getOrganizationType(store?.organization ?? [], okopf, inn),
|
|
3841
|
+
employerOrganization: getOrganizationKind(store?.employerOrganization ?? [], okopf),
|
|
3842
|
+
};
|
|
3843
|
+
for (const fieldName in organizationData) {
|
|
3844
|
+
organizationData[fieldName] && field?.(fieldName)?.onChange?.(organizationData[fieldName]);
|
|
3845
|
+
}
|
|
3838
3846
|
};
|
|
3847
|
+
const getOrganizationRequisites = (item) => ({
|
|
3848
|
+
inn: item.data?.inn ?? '',
|
|
3849
|
+
okopf: Number(item.data?.opf?.code),
|
|
3850
|
+
okved: item.data?.okved ?? '',
|
|
3851
|
+
});
|
|
3839
3852
|
|
|
3840
3853
|
const InnField = JSX(({ field, input }) => {
|
|
3841
3854
|
const store = useCreditFormStore();
|
|
@@ -4784,7 +4797,7 @@
|
|
|
4784
4797
|
}
|
|
4785
4798
|
}, [target, key]);
|
|
4786
4799
|
|
|
4787
|
-
const DraftActionButton = JSX(({ title, icon, description, onClick = noop }) => (jsxs("button", { className: "flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, children: [jsx(Img, { image: {
|
|
4800
|
+
const DraftActionButton = JSX(({ title, icon, description, onClick = noop }) => (jsxs("button", { className: "flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, children: [jsx(Img, { image: { icon: icon, iconVersion: 'black' }, width: "78", height: "78" }), jsxs("div", { children: [jsx(Heading, { className: "text-left", title: title, headingType: "h5" }), description ? (jsx(Paragraph, { color: "text-secondary-text", size: "text-m", children: description })) : null] })] })));
|
|
4788
4801
|
|
|
4789
4802
|
const creditCodesToProgrammIdMap = {
|
|
4790
4803
|
credit_cash: '10',
|
|
@@ -4950,7 +4963,7 @@
|
|
|
4950
4963
|
navigator.assign('/');
|
|
4951
4964
|
}, []);
|
|
4952
4965
|
const appeal = name && midname ? `${name} ${midname}, ` : '';
|
|
4953
|
-
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg", children: [jsx(Heading, { className: "whitespace-pre-wrap", title: `${appeal}мы нашли черновик вашей заявки.\nПродолжите заполнение?`, headingType: "h5" }), jsx(DraftActionButton, { title: "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0443", icon: "
|
|
4966
|
+
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg", children: [jsx(Heading, { className: "whitespace-pre-wrap", title: `${appeal}мы нашли черновик вашей заявки.\nПродолжите заполнение?`, headingType: "h5" }), jsx(DraftActionButton, { title: "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0443", icon: "BankIcon", description: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0439\u0442\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u044F\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u0438\u0437 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430", onClick: handleGoToDraft }), jsx(DraftActionButton, { title: isFromLead ? 'Продолжить заполнение текущей заявки' : 'Заполнить новую заявку', icon: "DocIcon", onClick: isFromLead ? onClose : handleGoToNewTask }), jsx(Button, { type: "button", version: "secondary", className: "w-full text-h5", onClick: handleGoToMainPage, children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })] }) }));
|
|
4954
4967
|
});
|
|
4955
4968
|
|
|
4956
4969
|
const EmptyDraftDialog = JSX(function ({ onClose = noop }) {
|
|
@@ -10805,7 +10818,7 @@
|
|
|
10805
10818
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10806
10819
|
});
|
|
10807
10820
|
|
|
10808
|
-
const packageVersion = "0.14.
|
|
10821
|
+
const packageVersion = "0.14.708";
|
|
10809
10822
|
|
|
10810
10823
|
exports.Blocks = Blocks;
|
|
10811
10824
|
exports.ContentPage = ContentPage;
|