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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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