Настроена работа чек боксов, добавлено popup окно активностей по клиенту, исправлены ошибки стилизации

This commit is contained in:
DwCay
2022-10-13 21:01:27 +03:00
parent 852f41719d
commit 56011797be
15 changed files with 168 additions and 75 deletions

View File

@@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 4.3607H2.8M19 4.3607H17.2M2.8 4.3607L4.49205 18.122C4.55369 18.6234 4.97948 19 5.48457 19H14.5154C15.0205 19 15.4463 18.6234 15.508 18.122L17.2 4.3607M2.8 4.3607H7.6M17.2 4.3607H12.4M8.2 8.30205V15.0587M11.8 8.30205V15.0587M7.6 4.3607C7.4 3.42229 7.6 1 10 1C12.4 1 12.6 3.42229 12.4 4.3607M7.6 4.3607H12.4" stroke="#FF6565" stroke-width="1.5" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 483 B

View File

@@ -0,0 +1,3 @@
<svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 1H10.913M1 4.5H7.78261M1 8H5.17391M10.3913 3.5V11M10.3913 11L7.78261 8M10.3913 11L13 8" stroke="#252850" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 269 B

View File

@@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.48073 1.49871C9.67288 1.03674 10.3273 1.03673 10.5195 1.49871L12.6454 6.61017C12.7264 6.80493 12.9096 6.938 13.1199 6.95485L18.6381 7.39725C19.1369 7.43723 19.3391 8.05964 18.9591 8.38514L14.7548 11.9866C14.5946 12.1238 14.5246 12.3391 14.5736 12.5443L15.858 17.9292C15.9741 18.4159 15.4447 18.8005 15.0177 18.5397L10.2933 15.6541C10.1133 15.5441 9.88691 15.5441 9.7069 15.6541L4.98251 18.5397C4.55551 18.8005 4.02606 18.4159 4.14215 17.9292L5.42664 12.5443C5.47558 12.3391 5.40562 12.1238 5.24543 11.9866L1.04111 8.38514C0.661119 8.05964 0.863352 7.43723 1.36209 7.39725L6.88034 6.95485C7.0906 6.938 7.27375 6.80493 7.35476 6.61017L9.48073 1.49871Z" stroke="#4772F2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 851 B

View File

@@ -1,6 +1,6 @@
\:root \:root
--bg-lavender-color: #e9e9f6 --bg-lavender-color: #e9e9f6
--bg-white-color: #f8f8ff --bg-white-color: #FFFFFF
--bg-ligth-blue-color: #e6eafc --bg-ligth-blue-color: #e6eafc
--font-dark-blue-color: #252850 --font-dark-blue-color: #252850
--font-black-color: #090a15 --font-black-color: #090a15
@@ -10,5 +10,4 @@
--border-light-grey-color: #d3d4dc --border-light-grey-color: #d3d4dc
--default-shadow: 4px 4px 8px rgba(9, 10, 21, 0.1), -4px -4px 8px rgba(9, 10, 21, 0.1) --default-shadow: 4px 4px 8px rgba(9, 10, 21, 0.1), -4px -4px 8px rgba(9, 10, 21, 0.1)
--bg-hover-row-table: rgba(215, 217, 255, 0.25) --bg-hover-row-table: rgba(215, 217, 255, 0.25)
--default-white: #FFFFFF
--btn-red-color: #FF6F6F --btn-red-color: #FF6F6F

View File

@@ -24,6 +24,7 @@ export default {
<style lang="sass" scoped> <style lang="sass" scoped>
.sidebar .sidebar
max-width: 80px max-width: 80px
min-width: 80px
background-color: #FFFFFF background-color: #FFFFFF
border-top-right-radius: 4px border-top-right-radius: 4px
</style> </style>

View File

@@ -1,7 +1,7 @@
<template lang="pug"> <template lang="pug">
.flex.gap-2.py-2.px-4.w-full.container(@click="selectOpen") .flex.gap-2.py-2.px-4.w-full.container.cursor-pointer(@click="selectOpen")
.relative.flex.flex-col .relative.flex.flex-col
.not-italic.text-base.select(:style="{ minWidth : width}") {{optionData}} .not-italic.text-base.select.cursor-pointer(:style="{ minWidth : width}") {{optionData}}
.absolute.options(v-if="isOpen" :id="id" @click="(event)=>chooseOption(event)") .absolute.options(v-if="isOpen" :id="id" @click="(event)=>chooseOption(event)")
.not-italic.text-base.option(v-for="(responsible, index) in listData" :key="index" :id="index") {{responsible}} .not-italic.text-base.option(v-for="(responsible, index) in listData" :key="index" :id="index") {{responsible}}
.select-form-separator .select-form-separator
@@ -26,7 +26,6 @@ export default {
<style lang="sass" scoped> <style lang="sass" scoped>
.container .container
align-items: center align-items: center
cursor: pointer
border-radius: 4px border-radius: 4px
width: fit-content width: fit-content
background-color: var(--bg-ligth-blue-color) background-color: var(--bg-ligth-blue-color)
@@ -34,7 +33,6 @@ export default {
appearance: none appearance: none
border: none border: none
outline: none outline: none
cursor: pointer
color: rgba(9, 10, 21, 0.5) color: rgba(9, 10, 21, 0.5)
background-color: rgba(9, 10, 21, 0) background-color: rgba(9, 10, 21, 0)
&::-webkit-calendar-picker-indicator &::-webkit-calendar-picker-indicator

View File

@@ -1,5 +1,5 @@
<template lang="pug"> <template lang="pug">
button.event-button.not-italic.leading-5.text-base.py-3.px-4 Создать событие button.event-button.cursor-pointer.not-italic.leading-5.text-base.py-3.px-4 Создать событие
</template> </template>
<script> <script>
@@ -12,7 +12,6 @@ export default {
.event-button .event-button
outline: none outline: none
border: none border: none
cursor: pointer
width: fit-content width: fit-content
color: var(--bg-white-color) color: var(--bg-white-color)
background-color: var(--btn-blue-color) background-color: var(--btn-blue-color)

View File

@@ -1,5 +1,5 @@
<template lang="pug"> <template lang="pug">
button.icon-plus.button-plus.text-xs.pt-1 button..cursor-pointer.icon-plus.button-plus.text-xs.pt-1
</template> </template>
<script> <script>
@@ -12,11 +12,10 @@ export default {
.button-plus .button-plus
outline: none outline: none
border: none border: none
cursor: pointer
width: 24px width: 24px
height: 24px height: 24px
max-height: 24px max-height: 24px
color: #4772F2 color: var(--btn-blue-color)
background-color: rgba(65, 105, 225, 0.25) background-color: rgba(65, 105, 225, 0.25)
border-radius: 50% border-radius: 50%
</style> </style>

View File

@@ -1,6 +1,6 @@
<template lang="pug"> <template lang="pug">
a(:href="path") a(:href="path")
button.button.text-4xl.py-3.pr-4.pl-3(:id="id") button.button.cursor-pointer.text-4xl.py-3.pr-4.pl-3(:id="id")
slot slot
</template> </template>
@@ -23,7 +23,6 @@ export default {
<style lang="sass" scoped> <style lang="sass" scoped>
.button .button
width: fit-content width: fit-content
cursor: pointer
background-color: rgba(65, 105, 225, 0) background-color: rgba(65, 105, 225, 0)
border-radius: 0 4px 4px 0 border-radius: 0 4px 4px 0
border-left-color: rgba(65, 105, 225, 0) border-left-color: rgba(65, 105, 225, 0)
@@ -35,9 +34,9 @@ export default {
.button:focus .button:focus
background-color: rgba(65, 105, 225, 0.3) background-color: rgba(65, 105, 225, 0.3)
border-left-color: rgba(65, 105, 225, 1) border-left-color: rgba(65, 105, 225, 1)
color: #4169E1 color: var(--btn-blue-color)
.button:hover .button:hover
background-color: rgba(65, 105, 225, 0.3) background-color: rgba(65, 105, 225, 0.3)
border-left-color: rgba(65, 105, 225, 1) border-left-color: rgba(65, 105, 225, 1)
color: #4169E1 color: var(--btn-blue-color)
</style> </style>

View File

@@ -3,7 +3,7 @@
.flex.flex-col.gap-y-2 .flex.flex-col.gap-y-2
.flex.justify-between.pt-2 .flex.justify-between.pt-2
span.not-italic.text-xs.opacity-40.leading-3 Ответственный span.not-italic.text-xs.opacity-40.leading-3 Ответственный
.icon-cancel.close-icon.text-xs(@click="closeEventForm") .icon-cancel.close-icon.cursor-pointer.text-xs(@click="closeEventForm")
base-select( base-select(
id="responsible" id="responsible"
width="205px" width="205px"
@@ -14,27 +14,27 @@
:select-open="openSelectResponsible" :select-open="openSelectResponsible"
) )
.flex.flex-col.gap-y-2 .flex.flex-col.gap-y-2
span.not-italic.text-xs.opacity-40.leading-3 Оновная информация span.not-italic.text-xs.opacity-40.leading-3 Основная информация
.flex.gap-x-4.items-center .flex.gap-x-4.items-center
.icon-time.text-xl.icon .icon-time.text-xl.icon
.flex.gap-x-2.items-center .flex.gap-x-2.items-center
.form-item.flex.gap-x-2.px-4.py-2.items-center .form-item.cursor-pointer.flex.gap-x-2.px-4.py-2.items-center
input.item-input.no-italic.text-base(v-model="eventData.timeEvent.firstTime" type="time" min="08:00" max="18:00") input.item-input.cursor-pointer.no-italic.text-base(v-model="eventData.timeEvent.firstTime" type="time" min="08:00" max="18:00")
span span
.form-item.flex.gap-x-2.px-4.py-2.items-center .form-item.cursor-pointer.flex.gap-x-2.px-4.py-2.items-center
input.item-input.no-italic.text-base(v-model="eventData.timeEvent.secondTime" type="time" min="08:00" max="18:00") input.item-input.cursor-pointer.no-italic.text-base(v-model="eventData.timeEvent.secondTime" type="time" min="08:00" max="18:00")
.flex.gap-x-4.items-center .flex.gap-x-4.items-center
.icon-person.text-xl.icon .icon-person.text-xl.icon
.form-item.flex.gap-x-2.px-4.py-2.items-center .form-item.cursor-pointer.flex.gap-x-2.px-4.py-2.items-center
input.item-input.no-italic.text-base(v-model="eventData.eventClient" type="text" placeholder="ФИО клиента") input.item-input.cursor-pointer.no-italic.text-base(v-model="eventData.eventClient" type="text" placeholder="ФИО клиента")
.flex.flex-col.gap-y-2(class='additional-information') .flex.flex-col.gap-y-2(class='additional-information')
.flex.gap-x-4.items-center .flex.gap-x-4.items-center
span.not-italic.text-xs.opacity-40.leading-3 Дополнительная информация span.not-italic.text-xs.opacity-40.leading-3 Дополнительная информация
button-plus(id="addInfo" @click="(e)=>addFriendInfo(e)") button-plus(id="addInfo" @click="(e)=>addFriendInfo(e)")
.flex.gap-x-4.items-center(v-for="(info, index) in listFriendInfo" :key="index") .flex.gap-x-4.items-center(v-for="(info, index) in listFriendInfo" :key="index")
span.ml-1 {{info}} span.ml-1 {{info}}
.form-item.flex.gap-x-2.px-4.py-2.items-center .form-item.cursor-pointer.flex.gap-x-2.px-4.py-2.items-center
input.item-input.no-italic.text-base(v-model="eventData.friendInfo[info]" type="text" placeholder="Что-то важное") input.item-input.cursor-pointer.no-italic.text-base(v-model="eventData.friendInfo[info]" type="text" placeholder="Что-то важное")
.flex.flex-col.gap-y-2 .flex.flex-col.gap-y-2
span.not-italic.text-xs.opacity-40.leading-3 Вид события span.not-italic.text-xs.opacity-40.leading-3 Вид события
base-select( base-select(
@@ -52,8 +52,8 @@
button-plus(id="addContact" @click="(e)=>addFriendInfo(e)") button-plus(id="addContact" @click="(e)=>addFriendInfo(e)")
.flex.gap-x-4.items-center(v-for="(contact, index) in listContacts" :key="index") .flex.gap-x-4.items-center(v-for="(contact, index) in listContacts" :key="index")
.icon-mail.text-xl.icon .icon-mail.text-xl.icon
.form-item.flex.gap-x-2.px-4.py-2.items-center .form-item.cursor-pointer.flex.gap-x-2.px-4.py-2.items-center
input.item-input.no-italic.text-base(v-model="eventData.contacts[contact]" type="text" placeholder="E-mail") input.item-input.cursor-pointer.no-italic.text-base(v-model="eventData.contacts[contact]" type="text" placeholder="E-mail")
add-event-button(@click="createEvent") add-event-button(@click="createEvent")
</template> </template>
@@ -135,7 +135,6 @@ export default {
box-shadow: -4px -4px 16px rgba(9, 10, 21, 0.25), 4px 4px 16px rgba(9, 10, 21, 0.25) box-shadow: -4px -4px 16px rgba(9, 10, 21, 0.25), 4px 4px 16px rgba(9, 10, 21, 0.25)
border-radius: 4px border-radius: 4px
.form-item .form-item
cursor: pointer
border-radius: 4px border-radius: 4px
width: fit-content width: fit-content
background-color: var(--bg-ligth-blue-color) background-color: var(--bg-ligth-blue-color)
@@ -143,7 +142,6 @@ export default {
appearance: none appearance: none
border: none border: none
outline: none outline: none
cursor: pointer
color: rgba(9, 10, 21, 0.5) color: rgba(9, 10, 21, 0.5)
background-color: rgba(9, 10, 21, 0) background-color: rgba(9, 10, 21, 0)
&::-webkit-calendar-picker-indicator &::-webkit-calendar-picker-indicator
@@ -154,7 +152,6 @@ export default {
height: 24px height: 24px
color: var(--font-dark-blue-color) color: var(--font-dark-blue-color)
.close-icon .close-icon
cursor: pointer
color: var(--font-dark-blue-color) color: var(--font-dark-blue-color)
&:hover &:hover
color: var(--btn-blue-color) color: var(--btn-blue-color)

View File

@@ -1,13 +1,15 @@
<template lang="pug"> <template lang="pug">
.popup-wrapper.absolute.flex.flex-col.gap-y-3.w-10.h-10.right-2.top-5.p-4 .flex.flex-col.items-end.absolute.right-2.top-5
.keep-redaction.flex.gap-x-3 .corner
.popup-wrapper.flex.flex-col.gap-y-3.w-10.h-10.p-4
.button.keep-redaction.flex.gap-x-3
.icon-edit.icon-redaction .icon-edit.icon-redaction
span Редактировать span Редактировать
.keep-redaction.flex.gap-x-3 .button.keep-redaction.flex.gap-x-3
.icon-star.icon-redaction img(src="@/assets/icons/star.svg" alt="Star")
span На ведение span На ведение
.delete.flex.gap-x-3 .button.delete.flex.gap-x-3
.icon-basket img(src="@/assets/icons/basket.svg" alt="Basket")
span Удалить span Удалить
</template> </template>
@@ -20,14 +22,25 @@ export default {
<style lang="sass" scoped> <style lang="sass" scoped>
.popup-wrapper .popup-wrapper
width: 180px width: 180px
height: 136px height: 128px
border-radius: 4px 0 4px 4px border-radius: 4px 0 4px 4px
background-color: var(--default-white) background-color: var(--bg-white-color)
box-shadow: var(--default-shadow) box-shadow: var(--default-shadow)
z-index: 1
.keep-redaction .keep-redaction
color: var(--font-dark-blue-color) color: var(--font-dark-blue-color)
.icon-redaction .icon-redaction
color: var(--btn-blue-color) color: var(--btn-blue-color)
.delete .delete
color: var(--btn-red-color) color: var(--btn-red-color)
.button
&:hover
opacity: 0.7
.corner
width: 8px
height: 8px
border-top-left-radius: 100%
background-color: var(--bg-white-color)
z-index: 2
overflow: hidden
</style> </style>

View File

@@ -4,43 +4,45 @@
thead.head-table thead.head-table
tr.head-row tr.head-row
th.w-3 th.w-3
.checkbox.px-4.py-3 .px-4.py-3
clients-table-checkbox clients-table-checkbox(:is-check="selectAll" :check="selectedCheck" id="all")
th.name th.name
.flex.px-4.justify-between.gap-x-40 .flex.px-4.justify-between
span.text-sm ФИО span.text-sm ФИО
.icon-down-arrow.text-xsm.mt-1 img.cursor-pointer(src="@/assets/icons/sort-number.svg" alt="SortNumber")
th.age th.age
.flex.px-4.justify-between .flex.px-4.justify-between
span.text-sm Возраст span.text-sm Возраст
.icon-down-arrow.text-xsm.mt-1 .icon.icon-down-arrow.text-xsm.mt-1.cursor-pointer
th th.job-title
.px-4.text-left .px-4.text-left
span.text-sm Должность span.text-sm Должность
th.priority th.priority
.flex.px-4.justify-between .flex.relative.px-4.justify-between
span.text-sm Приоритет span.text-sm Приоритет
.icon-down-arrow.text-xsm.mt-1 .icon.icon-down-arrow.text-xsm.mt-1.cursor-pointer
th th.phone
.phone.px-4.text-left .px-4.text-left
span.text-sm Телефон span.text-sm Телефон
th th.email
.email.px-4.text-left .px-4.text-left
span.text-sm Email span.text-sm Email
th th.networks
.networks.px-4.text-left .px-4.text-left
span.text-sm Сети span.text-sm.leading-8 Сети
th.meeting th.meeting
.flex.px-4.justify-between.gap-x-11 .flex.px-4.justify-between.gap-x-11
span.text-sm Ближайшая встреча span.text-sm.leading-4.whitespace-nowrap Ближайшая встреча
.icon-down-arrow.text-xsm.mt-1 .icon.icon-down-arrow.text-xsm.mt-1.cursor-pointer
th.w-5 th.w-5
.do.px-4 .do.px-4
span.text-sm Do span.text-sm Do
tbody tbody.tbody
clients-table-row(v-for="client in dataClients" clients-table-row(v-for="client in dataClients"
:key="client.id" :key="client.id"
:id="client.id" :id="client.id"
:is-check="marked.includes(client.id)"
:check="selectedCheck"
:full-name="client.fullName" :full-name="client.fullName"
:age="client.age" :age="client.age"
:job-title="client.jobTitle" :job-title="client.jobTitle"
@@ -60,6 +62,8 @@ export default {
components: { ClientsTableCheckbox, ClientsTableRow }, components: { ClientsTableCheckbox, ClientsTableRow },
data() { data() {
return { return {
selectAll: false,
marked: [],
dataClients: [ dataClients: [
{ {
id: "1", id: "1",
@@ -75,25 +79,85 @@ export default {
time: "18:3019:30", time: "18:3019:30",
}, },
}, },
{
id: "2",
fullName: "Астафоркина Екатерина Геннадьевна",
age: "54",
jobTitle: "Менеджер",
priority: "-",
phone: "+7 (574) 3645336",
email: "antimag@gmail.com",
networks: [],
meetingTime: {
date: "14.07.22",
time: "17:3021:30",
},
},
], ],
}; };
}, },
methods: {
selectedCheck(e) {
if (e.target.id === "all") {
this.selectAll = !this.selectAll;
this.marked = this.dataClients.map((el) => el.id);
!this.selectAll ? (this.marked = []) : true;
} else {
if (e.target.checked) {
this.marked = [...this.marked, e.target.id];
}
if (!e.target.checked) {
this.marked = this.marked.filter((el) => el !== e.target.id);
}
if (this.marked.length !== this.dataClients.length) {
this.selectAll = false;
} else {
this.selectAll = true;
}
}
},
},
}; };
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.check-box
min-width: 36px
max-width: 36px
.name
min-width: 400px
.age
min-width: 140px
.job-title
min-width: 200px
.priority
min-width: 124px
.phone
min-width: 190px
.email
min-width: 250px
.network
min-width: 152px
.meeting
max-width: 220px
.dots
min-width: 53px
max-width: 53px
.icon
color: var(--font-dark-blue-color)
&.priority-open
transform: rotate(180deg)
.head-table .head-table
color: var(--font-grey-color) color: var(--font-grey-color)
border-collapse: separate .tbody:before
border-bottom: 8px solid transparent content: "-"
.meeting display: block
max-width: 180px line-height: 8px
.priority color: transparent
max-width: 80px
.head-row .head-row
border-bottom: 1px solid #D3D4DC border-bottom: 1px solid #D3D4DC
.wrapper .wrapper
background-color: var(--default-white) background-color: var(--bg-white-color)
.color .color
background-color: red background-color: red
</style> </style>

View File

@@ -1,10 +1,15 @@
<template lang="pug"> <template lang="pug">
input.checkbox(type="checkbox") input.checkbox.cursor-pointer(type="checkbox" :id="id" :checked="isCheck" @change="(e) => check(e)")
</template> </template>
<script> <script>
export default { export default {
name: "ClientsTableCheckBox", name: "ClientsTableCheckBox",
props: {
id: String,
check: Function,
isCheck: Boolean,
},
}; };
</script> </script>

View File

@@ -1,8 +1,8 @@
<template lang="pug"> <template lang="pug">
tr.row-client.text-ms.cursor-pointer(:id="id") tr.row-client.text-ms.cursor-pointer(:id="id")
td.py-5 td.py-5
.px-4.items-center .px-4.items-center.w-fit
clients-table-checkbox clients-table-checkbox(:is-check="isCheck" :check="check" :id="id")
td.py-5 td.py-5
.px-4.font-semibold {{fullName}} .px-4.font-semibold {{fullName}}
td.py-5 td.py-5
@@ -26,8 +26,8 @@
span.meeting-time.text-xs.leading-5 {{meetingTime.time}} span.meeting-time.text-xs.leading-5 {{meetingTime.time}}
td.py-5 td.py-5
.px-4 .px-4
.relative.dots-button.icon-dots.text-center.cursor-pointer.leading-6 .relative.dots-button.icon-dots.text-center.cursor-pointer.leading-6(@click="openPopup")
clients-action-popup clients-action-popup(v-if="isOpenPopup")
</template> </template>
<script> <script>
@@ -36,8 +36,15 @@ import ClientsTableCheckbox from "@/pages/clients/components/ClientsTableCheckbo
export default { export default {
name: "ClientsTableRow", name: "ClientsTableRow",
components: { ClientsTableCheckbox, ClientsActionPopup }, components: { ClientsTableCheckbox, ClientsActionPopup },
data() {
return {
isOpenPopup: false,
};
},
props: { props: {
id: String, id: String,
check: Function,
isCheck: Boolean,
fullName: String, fullName: String,
age: String, age: String,
jobTitle: String, jobTitle: String,
@@ -47,6 +54,11 @@ export default {
networks: Array, networks: Array,
meetingTime: Object, meetingTime: Object,
}, },
methods: {
openPopup() {
this.isOpenPopup = !this.isOpenPopup;
},
},
}; };
</script> </script>
@@ -68,5 +80,5 @@ export default {
color: var(--font-grey-color) color: var(--font-grey-color)
&:hover &:hover
background-color: var(--btn-blue-color) background-color: var(--btn-blue-color)
color: var(--default-white) color: var(--bg-white-color)
</style> </style>

View File

@@ -10,5 +10,3 @@ export default {
components: { ClientsTable }, components: { ClientsTable },
}; };
</script> </script>
<style lang="sass" scoped></style>