feat(saving_account): add columns
This commit is contained in:
parent
bb14414af1
commit
1b03ecd905
3 changed files with 19 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ const renderDateTime = (value) => {
|
|||
|
||||
const renderCategory = (item) => {
|
||||
if (item !== null) {
|
||||
return `<span class="badge" style="background: ${item.color}"> </span> ${item.label}`
|
||||
return `<span class="fa-solid fa-square" style="color: ${item.color}" b> </span> ${item.label}`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import DataList from '../../components/crud/DataList.vue'
|
|||
import { ref, onMounted, watch } from 'vue'
|
||||
import { getStorage, saveStorage } from '../../lib/storage'
|
||||
import { createRequestOptions } from '../../lib/request'
|
||||
import { renderEuro, renderLabelWithSum } from '../../lib/renderers'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const endpoint = `/api/saving_account`
|
||||
|
|
@ -114,6 +115,22 @@ const fields = [
|
|||
key: 'label',
|
||||
label: 'Libellé',
|
||||
},
|
||||
{
|
||||
key: 'blocked_amount',
|
||||
renderLabel: (rows) => renderLabelWithSum('Montant bloqué', rows, 'blocked_amount'),
|
||||
width: '200px',
|
||||
thClasses: ['text-end'],
|
||||
tdClasses: ['text-end'],
|
||||
render: (item) => renderEuro(item.blocked_amount),
|
||||
},
|
||||
{
|
||||
key: 'released_amount',
|
||||
renderLabel: (rows) => renderLabelWithSum('Montant débloqué', rows, 'released_amount'),
|
||||
width: '200px',
|
||||
thClasses: ['text-end'],
|
||||
tdClasses: ['text-end'],
|
||||
render: (item) => renderEuro(item.released_amount),
|
||||
},
|
||||
]
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { BTableSimple, BTr, BTh, BTd, BModal, BFormSelect, BFormGroup, BButton, BRow, BCol } from 'bootstrap-vue-next'
|
||||
import { BTableSimple, BTr, BTh, BTd, BModal, BFormSelect, BButton, BRow, BCol } from 'bootstrap-vue-next'
|
||||
import { renderDate, renderCategory } from '../../lib/renderers'
|
||||
import { createRequestOptions } from '../../lib/request'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue