Merge pull request #185 from dderbentsov/UC-101

Уведомления cделаны жирнее, добавлен поиск по кнопке enter, курсоры на иконках инпутов
This commit is contained in:
Daria Golova
2022-12-08 15:15:09 +03:00
committed by GitHub
9 changed files with 39 additions and 22 deletions

View File

@@ -3,8 +3,8 @@
.notification-content.flex.mr-16
.grid(:class="{'grid-rows': message}")
.text-white.text-xs.icon.row-span-full.flex.justify-center.items-center(:class="iconClass")
.text-white.text-base.font-bold(v-if="title") {{ title }}
.text-white.text-base(v-if="message") {{ message }}
.text-white.text-base.font-black(v-if="title") {{ title }}
.text-white.text-base.font-semibold(v-if="message") {{ message }}
.icon-cancel.cursor-pointer.text-white.opacity-50.text-sm(class="hover:opacity-100 active:opacity-75", @click="delNotification")
</template>

View File

@@ -49,4 +49,5 @@ export default {
background: url("../../assets/icons/calendar-input.svg") no-repeat 100% 50%
&::-webkit-calendar-picker-indicator
opacity: 0
cursor: pointer
</style>

View File

@@ -43,4 +43,6 @@ export default {
border-radius: 4px
background-color: var(--default-white)
color: var(--font-black-color)
input::-webkit-calendar-picker-indicator
cursor: pointer
</style>

View File

@@ -1,7 +1,8 @@
<template lang="pug">
.base-select(@click="open = !open", :class="{'open': open, 'border-none': borderNone}")
.base-select(@click="invertOpen", :class="{'open': open && !disable, 'border-none': borderNone}")
.placeholder(
:class="{'value-color': value || placeholderOpacity, ...textClass}"
:class="{'value-color': value || placeholderOpacity, ...textClass}",
:style="{'color': !disable || '#9ca3af', 'opacity': 1}"
) {{ value || placeholder }}
.flex.items-center
.select-form-separator.cursor-pointer.mr-4(v-if="separator")
@@ -65,6 +66,9 @@ export default {
leaveSelect() {
this.open = false;
},
invertOpen() {
if (!this.disable) this.open = !this.open;
},
},
};
</script>

View File

@@ -64,9 +64,9 @@
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
client-detail-input.text-sm.w-max-fit(
v-if="section!=='docs' && isChange && settings[section].options[key] !== 'Дата выдачи'",
:style="{fontWeight:key === 'numba'&&600, maxHeight: settings[section].options[key] !== 'Выдан' ? '40px' : ''}",
:style="{fontWeight:key === 'numba'&&600}",
v-model:value="sectionInfo[key]",
:width="settings[section].width",
:rows="section ==='pass' ? 2 : 1",
:placeholder="settings[section].placeholder[key]"
:sharp="settings[section].sharps[key] && section === 'pass' ? settings[section].sharps[key] : ''"
)
@@ -79,7 +79,7 @@
@click="() => copyValue(item)"
)
.flex(v-if="settings[section].options && !isChange")
span.text-sm.w-fit(:style="{fontWeight:key === 'numba'&&600}") {{item === 'issued_by_date' ? formattedDate : item}}
span.text-sm.w-fit(:style="{fontWeight:key === 'numba'&&600}") {{key === 'issued_by_date' ? formattedDate : item}}
.copy.icon-copy.cursor-pointer.pl-4(
v-if="key === 'numba'",
@click="() => copyValue(item)"

View File

@@ -1,15 +1,15 @@
<template lang="pug">
.input-wrapper.flex.gap-x-2.px-3.box-border.w-max-fit(class="py-2.5")
textarea.place-input.w-full.outline-0.text-sm.not-italic.resize-none.font-medium(
.input-wrapper.flex.gap-x-2.px-3.box-border.w-max-fit.text-sm(class="py-2.5")
textarea.place-input.w-full.outline-0.not-italic.resize-none.font-medium(
v-if="!sharp"
:rows="Math.ceil(value.length/heightInput)",
:rows="textareaRows",
:value="value",
:cols="24",
@input="$emit('update:value', $event.target.value)",
:placeholder="placeholder",
)
input.place-input.w-full.outline-0.text-sm.not-italic.resize-none.font-medium(
input.w-full.outline-0.not-italic.font-medium(
v-else,
:rows="Math.ceil(value.length/heightInput)",
:value="value",
@input="$emit('update:value', $event.target.value)",
:placeholder="placeholder",
@@ -29,12 +29,17 @@ export default {
placeholder: {
default: "Поиск",
},
rows: Number,
},
directives: { mask },
computed: {
heightInput() {
return ((this.width / 100) * 70) / 11;
},
textareaRows() {
if (this.value.length <= 22) return this.rows;
return Math.ceil(this.value.length / 22);
},
},
};
</script>
@@ -44,4 +49,6 @@ export default {
border: 2px solid var(--border-light-grey-color)
border-radius: 4px
background-color: var(--default-white)
textarea
overflow: hidden
</style>

View File

@@ -2,7 +2,7 @@
.flex.flex-col.gap-y-4
.flex.flex-col(class="gap-y-1.5")
.text-info.text-xxs.font-semibold Город
base-select.cursor-grab(
base-select.select.text-sm(
disable,
textStyle="text-sm",
placeholder="Введите город",
@@ -11,7 +11,7 @@
)
.flex.flex-col(class="gap-y-1.5")
.text-info.text-xxs.font-semibold Область
base-input.input-info(
base-input.text-sm.input-info(
disabled,
placeholder="Введите область",
v-model:value="dopeAddress.region",
@@ -19,7 +19,7 @@
)
.flex.flex-col(class="gap-y-1.5")
.text-info.text-xxs.font-semibold Улица
base-input.input-info(
base-input.text-sm.input-info(
disabled,
placeholder="Введите улицу",
v-model:value="dopeAddress.street",
@@ -28,7 +28,7 @@
.flex.gap-x-4
.flex.flex-col(class="gap-y-1.5")
.text-info.text-xxs.font-semibold Дом
base-input.input-info(
base-input.text-sm.input-info(
disabled,
placeholder="Дом",
v-model:value="dopeAddress.house",
@@ -36,7 +36,7 @@
)
.flex.flex-col(class="gap-y-1.5")
.text-info.text-xxs.font-semibold Квартира
base-input.input-info(
base-input.text-sm.input-info(
disabled,
placeholder="Квартира",
v-model:value="dopeAddress.flat",
@@ -44,7 +44,7 @@
)
.flex.flex-col(class="gap-y-1.5")
.text-info.text-xxs.font-semibold Индекс
base-input.input-info(
base-input.text-sm.input-info(
disabled,
v-mask="'######'",
placeholder="000000",
@@ -75,4 +75,6 @@ export default {
color: var(--font-dark-blue-color)
.text-info
color: var(--font-grey-color)
.select
height: 40px
</style>

View File

@@ -6,7 +6,8 @@
:with-icon="true",
icon-position="left",
v-model:value="searchClient",
placeholder="Введите фамилию"
placeholder="Введите фамилию",
@keyup.enter="searchLastName"
)
.icon-search
base-button.font-semibold(

View File

@@ -410,17 +410,17 @@ export default {
if (response.type) {
if (response.errors[0].code === "blank")
this.addErrorNotification(
"Ошибка создания ДУЛ",
"Ошибка редактрирования ДУЛ",
"Часть паспортных данных не заполнена"
);
if (response.errors[0].code === "Ошибка создания ДУЛ")
if (response.errors[0].code === "Ошибка редактрирования ДУЛ")
this.addErrorNotification(
response.errors[0].code,
response.errors[0].detail
);
if (response?.errors[0].code === "invalid")
this.addErrorNotification(
"Ошибка создания ДУЛ",
"Ошибка редактрирования ДУЛ",
"Дата выдачи паспорта не заполнена"
);
} else this.addSuccessNotification("Изменения успешно сохранены", "");