diff --git a/src/components/base/BaseCategorySelection.vue b/src/components/base/BaseCategorySelection.vue new file mode 100644 index 0000000..a546267 --- /dev/null +++ b/src/components/base/BaseCategorySelection.vue @@ -0,0 +1,111 @@ + + + + diff --git a/src/components/base/BaseModal.vue b/src/components/base/BaseModal.vue index c908672..7832c5a 100644 --- a/src/components/base/BaseModal.vue +++ b/src/components/base/BaseModal.vue @@ -5,9 +5,13 @@ @hide="onHide", ref="dialog" ) - .base-content(:class="{'draggable': draggable}", ref="contentRef", :style="{...contentStyles, height}") + .base-content( + :class="{'draggable': draggable, 'base-content-default': !defaultPadding}", + ref="contentRef", + :style="{...contentStyles, height}" + ) q-resize-observer(@resize="onResize") - .base-header(draggable, :class="{'cursor-move': draggable}", ref="headerRef") + .base-header(v-if="!hideHeader" draggable, :class="{'cursor-move': draggable}", ref="headerRef") .header-title.text {{ title }} .icon-cancel.text-sm(@click="value = false", v-if="!showCloseIcon") slot @@ -25,6 +29,8 @@ export default { showCloseIcon: Boolean, draggable: Boolean, hideOverlay: Boolean, + defaultPadding: Boolean, + hideHeader: Boolean, height: { type: String, }, @@ -126,9 +132,11 @@ export default { justify-content: center align-items: center +.base-content-default + padding: 32px 40px + .base-content width: auto - padding: 32px 40px background-color: var(--default-white) box-shadow: 4px 4px 8px rgba(9, 10, 21, 0.1), -4px -4px 8px rgba(9, 10, 21, 0.1) border-radius: 4px diff --git a/src/pages/newMedicalCard/components/BasicDataForms/InsuranceForm.vue b/src/pages/newMedicalCard/components/BasicDataForms/InsuranceForm.vue index 3141531..8f91a58 100644 --- a/src/pages/newMedicalCard/components/BasicDataForms/InsuranceForm.vue +++ b/src/pages/newMedicalCard/components/BasicDataForms/InsuranceForm.vue @@ -37,28 +37,19 @@ :confirm-upload="confirmChangePhoto" ) .flex.w-full.h-10.relative(v-else-if="field.type === 'select'") - q-field.items-center.cursor-pointer( - standout, - :disable="!isEdit", - :outlined="isEdit" - ) - span(@click="openModalCategories") {{basic[insurance.insuranceKey][field.key]}} + .flex(@click="showModalCategories = true") + q-field.items-center.cursor-pointer( + standout, + :disable="!isEdit", + :outlined="isEdit" + ) {{basic[insurance.insuranceKey][field.key]}} base-modal( + default-padding, + hide-header, v-model="showModalCategories", title="Категории" ) - .flex - .flex.flex-col.gap-y-4 - base-input(outlined, :width="300") - .flex.items-center(v-for="benefit in benefitData", :key="benefit.id") - q-checkbox( - v-model="selected" - :val="benefit.id", - :style="{border: 'none', sidth: '36px'}", - size="32px" - ) - .flex {{benefit.name}} - .flex + base-category-selection(:benefit-data="benefitData" :close-modal-categories="closeModalCategories") .flex.font-medium.text-smm.absolute.top-10( v-if="basic?.benefit[insurance?.discount]", :style="{color: 'var(--font-grey-color)'}" @@ -90,6 +81,7 @@ import BaseInput from "@/components/base/BaseInput.vue"; import BaseModal from "@/components/base/BaseModal.vue"; import BaseUploadPhoto from "@/components/base/BaseUploadPhoto.vue"; import { getRequestChangeData } from "@/shared/utils/wrapperRequestChangeData"; +import BaseCategorySelection from "@/components/base/BaseCategorySelection.vue"; export default { name: "InsuranceForm", @@ -99,6 +91,7 @@ export default { BaseInput, BaseModal, BaseUploadPhoto, + BaseCategorySelection, }, data() { return { @@ -109,7 +102,6 @@ export default { showModal: false, showModalCategories: false, photoId: "", - selected: [], }; }, computed: { @@ -131,8 +123,8 @@ export default { this.photoId = id; this.showModal = true; }, - openModalCategories() { - this.showModalCategories = true; + closeModalCategories() { + this.showModalCategories = false; }, checkChangeInput() { this.isCheckChange = @@ -296,10 +288,6 @@ export default { background: rgba(0, 0, 0, 0.05) color: var(--font-dark-blue-color) -.q-checkbox :deep(.q-checkbox__bg) - border-radius: 50% - border: 1.5px solid var(--font-grey-color) - .select width: 324px diff --git a/tailwind.config.js b/tailwind.config.js index 9a61703..9d8b11e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -17,6 +17,7 @@ module.exports = { smm: ["14px", { lineHeight: "19px" }], base: ["16px", { lineHeight: "19px" }], m: ["16px", { lineHeight: "21.6px" }], + xm: ["16px", { lineHeight: "22px" }], lg: ["18px", { lineHeight: "21px" }], lgx: ["22px", { lineHeight: "25.83px" }], xl: ["20px", { lineHeight: "23px" }], @@ -25,6 +26,7 @@ module.exports = { "3xl": ["60px", { lineHeight: "70px" }], "4xl": ["44px", { lineHeight: "48px" }], "5xl": ["28px", { lineHeight: "38px" }], + "6xl": ["24px", { lineHeight: "32px" }], }, gap: { "6px": "6px",