diff --git a/server.js b/server.js
index 5dbe441..7f9e687 100644
--- a/server.js
+++ b/server.js
@@ -14,7 +14,7 @@ export function clientsServer() {
phone: "+7 (915) 657–21–14",
email: "Superboyband@yandex.ru",
networks: [],
- meetingTime: {
+ meeting: {
date: "02.06.22",
time: "18:30–19:30",
},
@@ -28,7 +28,7 @@ export function clientsServer() {
phone: "+7 (574) 364–53–36",
email: "antimag@gmail.com",
networks: [],
- meetingTime: {
+ meeting: {
date: "14.07.22",
time: "17:30–21:30",
},
diff --git a/src/pages/clients/components/ClientsTable.vue b/src/pages/clients/components/ClientsTable.vue
index 6e07ed3..ca11f17 100644
--- a/src/pages/clients/components/ClientsTable.vue
+++ b/src/pages/clients/components/ClientsTable.vue
@@ -1,45 +1,11 @@
.wrapper.flex.flex-col.gap-y-8.px-6.pt-6.h-full.w-full.min-w-fit
- clients-table-header(:is-open-actions="marked.length" :open-form-create="openFormCreate" )
- table.w-full
- thead.head-table
- tr.head-row
- th.w-3
- .px-4.py-3
- clients-table-checkbox(:is-check="selectAll" :check="selectedCheck" id="all")
- th
- .flex.px-4.justify-between
- span.text-sm ФИО
- img.cursor-pointer(src="@/assets/icons/sort-number.svg" alt="SortNumber")
- th
- .flex.px-4.justify-between.gap-x-6
- span.text-sm Возраст
- .icon.icon-down-arrow.text-xsm.mt-1.cursor-pointer
- th
- .px-4.text-left
- span.text-sm Должность
- th
- .flex.relative.px-4.justify-between.gap-x-3
- span.text-sm Приоритет
- .icon.icon-down-arrow.text-xsm.mt-1.cursor-pointer
- th
- .px-4.text-left
- span.text-sm Телефон
- th
- .px-4.text-left
- span.text-sm Email
- th
- .px-4.text-left
- span.text-sm.leading-8 Сети
- th
- .flex.px-4.justify-between.gap-x-11
- span.text-sm.leading-4.whitespace-nowrap Ближайшая встреча
- .icon.icon-down-arrow.text-xsm.mt-1.cursor-pointer
- th.w-5
- .do.px-4
- span.text-sm Do
- tbody.tbody
- clients-table-row(v-for="client in dataClients"
+ clients-table-hat(:is-open-actions="marked.length" :open-form-create="openFormCreate")
+ .flex.flex-col.h-full.gap-y-2
+ clients-table-header(:check="selectedCheck" :is-check="selectAll")
+ .flex.flex-col
+ clients-table-row(
+ v-for="client in dataClients"
:key="client.id"
:id="client.id"
:is-check="marked.includes(client.id)"
@@ -51,17 +17,23 @@
:phone="client.phone"
:email="client.email"
:networks="client.networks"
- :meeting-time="client.meetingTime"
+ :meeting-time="client.meeting"
)
diff --git a/src/pages/clients/components/ClientsTableHat.vue b/src/pages/clients/components/ClientsTableHat.vue
new file mode 100644
index 0000000..40f4c1e
--- /dev/null
+++ b/src/pages/clients/components/ClientsTableHat.vue
@@ -0,0 +1,42 @@
+
+ .flex.justify-between.w-full.h-fit
+ .flex.gap-2.w-fit.h-fit
+ .input
+ base-input(:with-icon="true")
+ button.filter-button.flex.items-center.justify-center.box-border(class="px-2.5")
+ .icon-filter.text-xl.leading-4
+ clients-table-header-actions(v-if="!!isOpenActions" :is-selected-one="isOpenActions===1")
+ .flex.w-fit.h-fit.gap-x-2
+ bass-export-button(:only-icon="true")
+ base-create-button(@click="openFormCreate" :with-icon="true")
+
+
+
+
+
+
diff --git a/src/pages/clients/components/ClientsTableHeader.vue b/src/pages/clients/components/ClientsTableHeader.vue
index 40f4c1e..75f7ec8 100644
--- a/src/pages/clients/components/ClientsTableHeader.vue
+++ b/src/pages/clients/components/ClientsTableHeader.vue
@@ -1,42 +1,35 @@
- .flex.justify-between.w-full.h-fit
- .flex.gap-2.w-fit.h-fit
- .input
- base-input(:with-icon="true")
- button.filter-button.flex.items-center.justify-center.box-border(class="px-2.5")
- .icon-filter.text-xl.leading-4
- clients-table-header-actions(v-if="!!isOpenActions" :is-selected-one="isOpenActions===1")
- .flex.w-fit.h-fit.gap-x-2
- bass-export-button(:only-icon="true")
- base-create-button(@click="openFormCreate" :with-icon="true")
-
+ .flex.row.text-base.font-semibold
+ clients-table-cell-header(v-for="cell in columnHead" :title="cell.title" :width="cell.width" :class="!cell.title && 'px-3'")
+ .icon-down-arrow.icon.text-xsm.cursor-pointer(v-if="cell.iconHead && cell.name !== 'fullName'" )
+ img.cursor-pointer(v-if="cell.iconHead && cell.name === 'fullName'" src="@/assets/icons/sort-number.svg" alt="SortNumber")
+ clients-table-checkbox(v-if="cell.name === 'checkbox'" :id="cell.name" :check="check" :is-check="isCheck")
diff --git a/src/pages/clients/components/ClientsTableRow.vue b/src/pages/clients/components/ClientsTableRow.vue
index cdb4b6a..8afb86f 100644
--- a/src/pages/clients/components/ClientsTableRow.vue
+++ b/src/pages/clients/components/ClientsTableRow.vue
@@ -1,44 +1,50 @@
- tr.row-client.text-ms.cursor-pointer(:id="id")
- td.py-5
- .px-4.items-center.w-fit
- clients-table-checkbox(:is-check="isCheck" :check="check" :id="id")
- td.py-5
- .px-4.font-semibold.whitespace-nowrap {{fullName}}
- td.py-5
- .px-4.whitespace-nowrap {{age}}
- td.py-5
- .px-4.whitespace-nowrap {{jobTitle}}
- td.py-5
- .px-4.whitespace-nowrap.flex.items-center.gap-x-2
- .circle.w-2.h-2
- span {{priority}}
- td.py-5
- .px-4.whitespace-nowrap {{phone}}
- td.py-5
- .px-4.whitespace-nowrap {{email}}
- td.py-5
- .px-4.whitespace-nowrap.flex
- .w-fit.h-fit(v-for="network in networks" :key="network")
- td.py-5
- .px-4.whitespace-nowrap.gap-x-2.flex
- span {{meetingTime.date}}
- span.meeting-time.text-xs.leading-5 {{meetingTime.time}}
- td.py-5
- .px-4
- .relative.dots-button.icon-dots.text-center.cursor-pointer.leading-6(:tabindex="1" @click="(e) => openPopup(e)" @blur="handleUnFocusPopup")
- clients-action-popup(v-if="isOpenPopup")
+ .row-body.flex.w-full.cursor-pointer
+ .check-box.flex.justify-center.items-center
+ clients-table-checkbox(:id="id" :check="check" :is-check="isCheck")
+ table-cell-body-name(:value="fullName" :width="columnBody.find(el => el.name === 'fullName').width")
+ table-cell-body-age(:value="age" :width="columnBody.find(el => el.name === 'age').width")
+ table-cell-body-job-title(:value="jobTitle" :width="columnBody.find(el => el.name === 'jobTitle').width")
+ table-cell-body-priority(:value="priority" :width="columnBody.find(el => el.name === 'priority').width")
+ table-cell-body-phone(:value="phone" :width="columnBody.find(el => el.name === 'phone').width")
+ table-cell-body-email(:value="email" :width="columnBody.find(el => el.name === 'email').width")
+ table-cell-body-networks(:networks="networks" :width="columnBody.find(el => el.name === 'networks').width")
+ table-cell-body-meeting(:date="meetingTime.date" :time="meetingTime.time" :width="columnBody.find(el => el.name === 'meeting').width")
+ .dots.flex.justify-center.items-center
+ .relative.dots-button.icon-dots.cursor-pointer.leading-6.text-center(:tabindex="1" @click="(e) => openPopup(e)" @blur="handleUnFocusPopup")
+ clients-action-popup(v-if="isOpenPopup")
diff --git a/src/pages/clients/components/cells/TableCellBodyAge.vue b/src/pages/clients/components/cells/TableCellBodyAge.vue
new file mode 100644
index 0000000..2b665d8
--- /dev/null
+++ b/src/pages/clients/components/cells/TableCellBodyAge.vue
@@ -0,0 +1,14 @@
+
+ .flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
+ span.text-sm {{value}}
+
+
+
diff --git a/src/pages/clients/components/cells/TableCellBodyEmail.vue b/src/pages/clients/components/cells/TableCellBodyEmail.vue
new file mode 100644
index 0000000..dd43333
--- /dev/null
+++ b/src/pages/clients/components/cells/TableCellBodyEmail.vue
@@ -0,0 +1,14 @@
+
+ .flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
+ span.text-sm {{value}}
+
+
+
diff --git a/src/pages/clients/components/cells/TableCellBodyJobTitle.vue b/src/pages/clients/components/cells/TableCellBodyJobTitle.vue
new file mode 100644
index 0000000..ed23776
--- /dev/null
+++ b/src/pages/clients/components/cells/TableCellBodyJobTitle.vue
@@ -0,0 +1,14 @@
+
+ .flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
+ span.text-sm {{value}}
+
+
+
diff --git a/src/pages/clients/components/cells/TableCellBodyMeeting.vue b/src/pages/clients/components/cells/TableCellBodyMeeting.vue
new file mode 100644
index 0000000..0502ddc
--- /dev/null
+++ b/src/pages/clients/components/cells/TableCellBodyMeeting.vue
@@ -0,0 +1,21 @@
+
+ .flex.box-border.px-4.items-center.gap-x-2.w-full(:style="{ minWidth : width + 'px' }")
+ span.text-sm {{date}}
+ span.time.text-xs {{time}}
+
+
+
+
+
diff --git a/src/pages/clients/components/cells/TableCellBodyName.vue b/src/pages/clients/components/cells/TableCellBodyName.vue
new file mode 100644
index 0000000..167420d
--- /dev/null
+++ b/src/pages/clients/components/cells/TableCellBodyName.vue
@@ -0,0 +1,16 @@
+
+ .flex.box-border.px-4.items-center.gap-x-3.w-full(:style="{ minWidth : width + 'px' }")
+ img(v-if="imgUrl" :src="imgUrl" alt="Avatar")
+ span.text-sm.font-semibold {{value}}
+
+
+
diff --git a/src/pages/clients/components/cells/TableCellBodyNetworks.vue b/src/pages/clients/components/cells/TableCellBodyNetworks.vue
new file mode 100644
index 0000000..97eb4ee
--- /dev/null
+++ b/src/pages/clients/components/cells/TableCellBodyNetworks.vue
@@ -0,0 +1,14 @@
+
+ .flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
+ .w-5.h-5(v-for="network in networks")
+
+
+
diff --git a/src/pages/clients/components/cells/TableCellBodyPhone.vue b/src/pages/clients/components/cells/TableCellBodyPhone.vue
new file mode 100644
index 0000000..181f2ef
--- /dev/null
+++ b/src/pages/clients/components/cells/TableCellBodyPhone.vue
@@ -0,0 +1,14 @@
+
+ .flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
+ span.text-sm {{value}}
+
+
+
diff --git a/src/pages/clients/components/cells/TableCellBodyPriority.vue b/src/pages/clients/components/cells/TableCellBodyPriority.vue
new file mode 100644
index 0000000..82896d5
--- /dev/null
+++ b/src/pages/clients/components/cells/TableCellBodyPriority.vue
@@ -0,0 +1,24 @@
+
+ .flex.box-border.px-4.items-center.gap-x-2.w-full(:style="{ minWidth : width + 'px' }")
+ .dot.w-2.h-2
+ span.text-sm(:style="{ color : color }") {{value}}
+
+
+
+
+
diff --git a/src/pages/clients/utils/tableConfig.js b/src/pages/clients/utils/tableConfig.js
new file mode 100644
index 0000000..6c27296
--- /dev/null
+++ b/src/pages/clients/utils/tableConfig.js
@@ -0,0 +1,61 @@
+export const column = [
+ {
+ name: "checkbox",
+ iconHead: false,
+ width: 36,
+ },
+ {
+ name: "fullName",
+ title: "ФИО",
+ iconHead: true,
+ width: 400,
+ },
+ {
+ name: "age",
+ title: "Возраст",
+ iconHead: true,
+ width: 140,
+ },
+ {
+ name: "jobTitle",
+ title: "Должность",
+ iconHead: false,
+ width: 200,
+ },
+ {
+ name: "priority",
+ title: "Приоритет",
+ iconHead: true,
+ width: 124,
+ },
+ {
+ name: "phone",
+ title: "Телефон",
+ iconHead: false,
+ width: 170,
+ },
+ {
+ name: "email",
+ title: "Email",
+ iconHead: false,
+ width: 250,
+ },
+ {
+ name: "networks",
+ title: "Сети",
+ iconHead: false,
+ width: 152,
+ },
+ {
+ name: "meeting",
+ title: "Ближайшая встреча",
+ iconHead: true,
+ width: 220,
+ },
+ {
+ name: "dots",
+ title: "Do",
+ iconHead: false,
+ width: 53,
+ },
+];