Merge branch 'ASTRA-147' into 'master'
[WIP] Отредактировал стили на модальном окне создания льгот, согласно дизайну See merge request andrusyakka/urban-couscous!470
This commit is contained in:
@@ -72,6 +72,7 @@
|
|||||||
--bg-event-grey-color: #87898f
|
--bg-event-grey-color: #87898f
|
||||||
--bg-event-grey-color-0: #d3d4d7
|
--bg-event-grey-color-0: #d3d4d7
|
||||||
--bg-event-grey-color-1: #acadb1
|
--bg-event-grey-color-1: #acadb1
|
||||||
|
--bg-event-gret-color-2: #d3d4d0
|
||||||
--light-grey-bg-color: #f8f9fa
|
--light-grey-bg-color: #f8f9fa
|
||||||
--btn-green-color: rgba(60, 217, 75, 1)
|
--btn-green-color: rgba(60, 217, 75, 1)
|
||||||
--btn-light-green-color: rgba(60, 217, 75, 0.2)
|
--btn-light-green-color: rgba(60, 217, 75, 0.2)
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.selection-wrapper.flex
|
.selection-wrapper.flex
|
||||||
.left-side.flex.flex-col.gap-y-4
|
.left-side.flex.flex-col
|
||||||
|
.flex.flex-col.gap-y-4.h-full
|
||||||
|
.flex.flex-col.gap-y-6
|
||||||
.flex.font-bold.text-xl Категории
|
.flex.font-bold.text-xl Категории
|
||||||
base-input(
|
base-input.input(
|
||||||
placeholder="Поиск",
|
placeholder="Поиск",
|
||||||
@keyup.enter="searchCategory",
|
@keyup.enter="searchCategory",
|
||||||
@input="searchCategory",
|
@input="searchCategory",
|
||||||
@@ -17,20 +19,19 @@
|
|||||||
size="20px",
|
size="20px",
|
||||||
style="color: var(--font-grey-color)"
|
style="color: var(--font-grey-color)"
|
||||||
)
|
)
|
||||||
.field.flex.flex-col.overflow-y-scroll
|
.field.flex.flex-col.overflow-y-scroll(:class="{'filed-category': findSelected(selected?.id)}")
|
||||||
.flex.items-center(
|
.flex.items-center(v-for="benefit in benefitData", :key="benefit.id")
|
||||||
v-for="benefit in benefitData",
|
q-item(tag="label", :style="{alignItems: benefit.name.length > 28 ? 'start' : 'center'}")
|
||||||
:key="benefit.id",
|
q-item-section(top)
|
||||||
:style="{alignItems: benefit.name.length > 28 ? 'start' : 'center'}"
|
q-radio(
|
||||||
)
|
|
||||||
q-checkbox(
|
|
||||||
v-model="selected",
|
v-model="selected",
|
||||||
:val="benefit",
|
:val="benefit",
|
||||||
:style="{border: 'none', width: '36px'}",
|
:style="{border: 'none', width: '36px'}",
|
||||||
size="32px"
|
size="32px",
|
||||||
)
|
)
|
||||||
|
q-item-label
|
||||||
.name.flex.items-center.font-medium.text-xm {{benefit.name}}
|
.name.flex.items-center.font-medium.text-xm {{benefit.name}}
|
||||||
.buttons-group.flex.py-4.px-8.justify-center
|
.buttons-group.flex.py-4.px-8.justify-center(v-if="!findSelected(selected?.id)")
|
||||||
base-button(
|
base-button(
|
||||||
type="secondary",
|
type="secondary",
|
||||||
label="Сбросить",
|
label="Сбросить",
|
||||||
@@ -38,27 +39,24 @@
|
|||||||
@click="closeModalCategories"
|
@click="closeModalCategories"
|
||||||
)
|
)
|
||||||
base-button(
|
base-button(
|
||||||
v-if="selected[0]?.id",
|
|
||||||
label="Сохранить",
|
label="Сохранить",
|
||||||
width="146px",
|
width="146px",
|
||||||
@click="saveCategories(selected[0])"
|
@click="saveCategories(selected[0])"
|
||||||
)
|
)
|
||||||
.right-side.flex.px-14.font-bold.relative
|
.right-side.flex.px-10.font-bold.relative
|
||||||
q-icon(name="app:icon-cancel").text-sm.absolute.top-4.right-4.cursor-pointer(@click="closeModalCategories")
|
q-icon(name="app:icon-cancel").text-sm.absolute.top-4.right-4.cursor-pointer(@click="closeModalCategories")
|
||||||
.flex.py-10.gap-y-6.flex-col(v-if="selected[0]?.id && selected[0]?.name !== 'Без льготы'")
|
.flex.gap-y-6.flex-col.w-full(v-if="selected?.id && selected?.name !== 'Без льготы'")
|
||||||
.flex.text-6xl {{selected[0]?.name}}
|
.right-header.flex
|
||||||
.flex.text-xm.flex-col.gap-y-3 Критерии:
|
span.text-6xl {{selected?.name}}
|
||||||
|
.flex.text-xm.flex-col.gap-y-3.mt-1 Критерии:
|
||||||
.flex.flex-col.gap-y-2
|
.flex.flex-col.gap-y-2
|
||||||
.flex.font-medium.text-smm(v-for="item in choiceCriteria", :key="item.id")
|
.grey-color.flex.font-medium.text-smm(v-for="item in choiceCriteria", :key="item.id") {{"- " + item}}
|
||||||
span {{"- " + item}}
|
|
||||||
.flex.text-xm.flex-col.gap-y-3 Документы для подтверждения:
|
.flex.text-xm.flex-col.gap-y-3 Документы для подтверждения:
|
||||||
.flex.flex-col.gap-y-2
|
.flex.flex-col.gap-y-2
|
||||||
.flex.font-medium.text-smm(v-for="item in choiceDocumentation", :key="item.id")
|
.grey-color.flex.font-medium.text-smm(v-for="item in choiceDocumentation", :key="item.id") {{"- " + item}}
|
||||||
span {{"- " + item}}
|
|
||||||
.flex.text-xm.flex-col.gap-y-3 Льготы:
|
.flex.text-xm.flex-col.gap-y-3 Льготы:
|
||||||
.flex.flex-col.gap-y-2
|
.flex.flex-col.gap-y-2
|
||||||
.flex.font-medium.text-smm(v-for="item in choicePrivileges", :key="item.id")
|
.grey-color.flex.font-medium.text-smm(v-for="item in choicePrivileges", :key="item.id") {{"- " + item}}
|
||||||
span {{"- " + item}}
|
|
||||||
.flex.items-center.h-full.w-full.justify-center.font-medium.text-6xl(
|
.flex.items-center.h-full.w-full.justify-center.font-medium.text-6xl(
|
||||||
v-else,
|
v-else,
|
||||||
:style="{color: 'var(--font-grey-color)'}"
|
:style="{color: 'var(--font-grey-color)'}"
|
||||||
@@ -68,6 +66,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import BaseInput from "@/components/base/BaseInput.vue";
|
import BaseInput from "@/components/base/BaseInput.vue";
|
||||||
import BaseButton from "@/components/base/BaseButton.vue";
|
import BaseButton from "@/components/base/BaseButton.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BaseCategorySelection",
|
name: "BaseCategorySelection",
|
||||||
components: { BaseInput, BaseButton },
|
components: { BaseInput, BaseButton },
|
||||||
@@ -81,43 +80,37 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selected: [],
|
selected: {},
|
||||||
searchBenefit: "",
|
searchBenefit: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
choiceCriteria() {
|
choiceCriteria() {
|
||||||
return this.selected[0]?.criteria.split(",");
|
return this.selected?.criteria.split(",");
|
||||||
},
|
},
|
||||||
choiceDocumentation() {
|
choiceDocumentation() {
|
||||||
return this.selected[0]?.documentation.split(",");
|
return this.selected?.documentation.split(",");
|
||||||
},
|
},
|
||||||
choicePrivileges() {
|
choicePrivileges() {
|
||||||
return this.selected[0]?.privileges.split(",");
|
return this.selected?.privileges.split(",");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
findSelected(id) {
|
||||||
|
return this.basic?.id === id ? true : false;
|
||||||
|
},
|
||||||
searchCategory() {
|
searchCategory() {
|
||||||
this.$emit("search", this.searchBenefit);
|
this.$emit("search", this.searchBenefit);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selected: {
|
|
||||||
immediate: true,
|
|
||||||
deep: true,
|
|
||||||
handler() {
|
|
||||||
if (this.selected.length >= 2) this.selected.shift();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
showModal: {
|
showModal: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (!newVal) {
|
if (!newVal) {
|
||||||
this.searchBenefit = "";
|
this.searchBenefit = "";
|
||||||
} else {
|
} else {
|
||||||
this.selected.push(
|
this.selected = this.benefitData.find((e) => e.name === "Без льготы");
|
||||||
this.benefitData.find((e) => e.name === "Без льготы")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -126,13 +119,9 @@ export default {
|
|||||||
deep: true,
|
deep: true,
|
||||||
handler() {
|
handler() {
|
||||||
if (this.benefitData && this.showModal && !this.basic.id) {
|
if (this.benefitData && this.showModal && !this.basic.id) {
|
||||||
this.selected.push(
|
this.selected = this.benefitData.find((e) => e.name === "Без льготы");
|
||||||
this.benefitData.find((e) => e.name === "Без льготы")
|
|
||||||
);
|
|
||||||
} else if (this.basic.id) {
|
} else if (this.basic.id) {
|
||||||
this.selected.push(
|
this.selected = this.benefitData.find((e) => e.id === this.basic.id);
|
||||||
this.benefitData.find((e) => e.id === this.basic.id)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -145,36 +134,80 @@ export default {
|
|||||||
width: 895px
|
width: 895px
|
||||||
height: 660px
|
height: 660px
|
||||||
font-feature-settings: 'pnum' on, 'lnum' on
|
font-feature-settings: 'pnum' on, 'lnum' on
|
||||||
|
color: var(--font-dark-blue-color)
|
||||||
|
|
||||||
.left-side
|
.left-side
|
||||||
width: 364px
|
width: 364px
|
||||||
padding: 32px 28px 0px
|
padding: 28px 32px 0px
|
||||||
|
|
||||||
.field
|
.field
|
||||||
height: 457px
|
height: 456px
|
||||||
margin-right: -12px
|
margin-right: -16px
|
||||||
&::-webkit-scrollbar
|
&::-webkit-scrollbar
|
||||||
width: 4px
|
width: 4px
|
||||||
|
&::-webkit-scrollbar-track:vertical
|
||||||
|
margin-bottom: 24px
|
||||||
|
|
||||||
|
.filed-category
|
||||||
|
height: 100%
|
||||||
|
&::-webkit-scrollbar-track:vertical
|
||||||
|
margin-bottom: 16px
|
||||||
|
|
||||||
.name
|
.name
|
||||||
min-height: 40px
|
min-height: 40px
|
||||||
padding-top: 4px
|
padding-top: 8px
|
||||||
padding-bottom: 4px
|
padding-bottom: 4px
|
||||||
border-bottom: 1px solid var(--bg-light-grey)
|
border-bottom: 1px solid var(--bg-light-grey)
|
||||||
width: 268px
|
width: 264px
|
||||||
|
|
||||||
.q-checkbox :deep(.q-checkbox__bg)
|
.q-checkbox :deep(.q-checkbox__bg)
|
||||||
border-radius: 50%
|
border-radius: 50%
|
||||||
border: 1.5px solid var(--font-grey-color)
|
border: 1.5px solid var(--font-grey-color)
|
||||||
|
|
||||||
.buttons-group
|
.buttons-group
|
||||||
border-top: 1px solid #D3D4D0
|
border-top: 1px solid var(--bg-event-gret-color-2)
|
||||||
margin-left: -28px
|
margin-left: -32px
|
||||||
margin-right: -28px
|
margin-right: -32px
|
||||||
column-gap: 7px
|
column-gap: 7px
|
||||||
|
|
||||||
.right-side
|
.right-side
|
||||||
background: var(--bg-light-grey)
|
line-height: 135%
|
||||||
|
background: var(--default-white)
|
||||||
|
border-left: 1px solid var(--border-light-grey-color)
|
||||||
width: 531px
|
width: 531px
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|
||||||
|
.right-header
|
||||||
|
padding: 27px 40px
|
||||||
|
margin-left: -40px
|
||||||
|
margin-right: -40px
|
||||||
|
border-bottom: 1px solid var(--border-light-grey-color)
|
||||||
|
|
||||||
|
.grey-color
|
||||||
|
color: var(--font-grey-color)
|
||||||
|
|
||||||
|
.q-item
|
||||||
|
padding: 0
|
||||||
|
min-height: 40px
|
||||||
|
|
||||||
|
.q-item__section
|
||||||
|
width: 36px
|
||||||
|
min-width: 36px
|
||||||
|
|
||||||
|
.q-item :deep(.q-focus-helper)
|
||||||
|
width: 0
|
||||||
|
height: 0
|
||||||
|
|
||||||
|
.input :deep(.q-field__native)
|
||||||
|
color: var(--font-grey-color)
|
||||||
|
font-size: 16px !important
|
||||||
|
font-style: normal
|
||||||
|
line-height: normal !important
|
||||||
|
|
||||||
|
.input :deep(.q-field__control)
|
||||||
|
color: var(--font-dark-blue-color)
|
||||||
|
&:hover:before
|
||||||
|
border: 1px solid var(--font-dark-blue-color)
|
||||||
|
&:after
|
||||||
|
border-width: 1px !important
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ export default {
|
|||||||
padding: 28px 32px
|
padding: 28px 32px
|
||||||
|
|
||||||
.base-content
|
.base-content
|
||||||
|
overflow-x: hidden
|
||||||
width: auto
|
width: auto
|
||||||
background-color: var(--default-white)
|
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)
|
box-shadow: 4px 4px 8px rgba(9, 10, 21, 0.1), -4px -4px 8px rgba(9, 10, 21, 0.1)
|
||||||
|
|||||||
@@ -48,7 +48,8 @@
|
|||||||
v-else-if="field.type === 'select'",
|
v-else-if="field.type === 'select'",
|
||||||
@click="openModalCategories"
|
@click="openModalCategories"
|
||||||
)
|
)
|
||||||
q-field.items-center.cursor-pointer(
|
q-field.items-center(
|
||||||
|
:style="{cursor: isEdit ? 'pointer' : 'default'}",
|
||||||
standout,
|
standout,
|
||||||
:readonly="!isEdit",
|
:readonly="!isEdit",
|
||||||
:outlined="isEdit",
|
:outlined="isEdit",
|
||||||
@@ -417,6 +418,7 @@ export default {
|
|||||||
.q-badge
|
.q-badge
|
||||||
padding: 4px
|
padding: 4px
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
.delete
|
.delete
|
||||||
background-color: var(--btn-red-color)
|
background-color: var(--btn-red-color)
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user