|
66 | 66 | {{ row.getValue('id') }} |
67 | 67 | </template> |
68 | 68 | <template #internalId-cell="{ row }"> |
69 | | - <div class="flex flex-row gap-2 items-center"> |
70 | | - <p class="text-base font-medium text-highlighted"> |
71 | | - {{ row.getValue('internalId') }} |
| 69 | + <div class="flex flex-col gap-0.5"> |
| 70 | + <div class="flex flex-row gap-2 items-center"> |
| 71 | + <p class="text-base font-medium text-highlighted"> |
| 72 | + {{ row.getValue('internalId') }} |
| 73 | + </p> |
| 74 | + <UIcon |
| 75 | + v-if="row.getValue('isActive')" |
| 76 | + name="i-lucide-check" |
| 77 | + class="size-4 text-secondary" |
| 78 | + /> |
| 79 | + </div> |
| 80 | + |
| 81 | + <p v-if="row.original.concludedAt" class="text-xs"> |
| 82 | + от {{ format(new Date(row.original.concludedAt), 'd MMMM yyyy', { locale: ru }) }} |
72 | 83 | </p> |
73 | | - <UIcon |
74 | | - v-if="row.getValue('isActive')" |
75 | | - name="i-lucide-check" |
76 | | - class="size-4 text-secondary" |
77 | | - /> |
78 | 84 | </div> |
79 | 85 | </template> |
80 | 86 | <template #kitchens-cell="{ row }"> |
|
98 | 104 | <AgreementFilesBlock :files="row.original.files" /> |
99 | 105 | </template> |
100 | 106 | <template #royalty-cell="{ row }"> |
101 | | - {{ row.getValue('royalty') }}% / от {{ formatNumber(row.getValue('minRoyaltyPerMonth')) }} |
| 107 | + <div class="text-center"> |
| 108 | + <div>{{ row.getValue('royalty') }}%</div> |
| 109 | + от {{ formatNumber(row.getValue('minRoyaltyPerMonth')) }} |
| 110 | + </div> |
102 | 111 | </template> |
103 | 112 | <template #marketingFee-cell="{ row }"> |
104 | | - {{ row.getValue('marketingFee') }}% / от {{ formatNumber(row.getValue('minMarketingFeePerMonth')) }} |
| 113 | + <div v-if="row.getValue('marketingFee')" class="text-center"> |
| 114 | + <div>{{ row.getValue('marketingFee') }}%</div> |
| 115 | + от {{ formatNumber(row.getValue('minMarketingFeePerMonth')) }} |
| 116 | + </div> |
| 117 | + <div v-else class="text-center"> |
| 118 | + - |
| 119 | + </div> |
105 | 120 | </template> |
106 | 121 | <template #comment-cell="{ row }"> |
107 | 122 | <div class="text-sm/4 whitespace-pre-wrap max-w-56"> |
@@ -151,6 +166,8 @@ import type { DropdownMenuItem, TableColumn } from '@nuxt/ui' |
151 | 166 | import type { PartnerAgreement } from '@roll-stack/database' |
152 | 167 | import type { PartnerAgreementWithAllData } from '~/stores/partner' |
153 | 168 | import { getPaginationRowModel } from '@tanstack/table-core' |
| 169 | +import { format } from 'date-fns' |
| 170 | +import { ru } from 'date-fns/locale/ru' |
154 | 171 | import { upperFirst } from 'scule' |
155 | 172 |
|
156 | 173 | const UButton = resolveComponent('UButton') |
@@ -207,7 +224,7 @@ const columns: Ref<TableColumn<PartnerAgreementWithAllData>[]> = ref([{ |
207 | 224 | header: 'Кухни', |
208 | 225 | }, { |
209 | 226 | accessorKey: 'files', |
210 | | - header: 'Файлы / сканы', |
| 227 | + header: 'Файлы', |
211 | 228 | }, { |
212 | 229 | accessorKey: 'legalEntity', |
213 | 230 | header: 'Юр. лицо', |
|
0 commit comments