💄 (account card) fix account card disposition in account grid
This commit is contained in:
@@ -5,16 +5,17 @@
|
|||||||
@click="goToAccount(account._id || '')"
|
@click="goToAccount(account._id || '')"
|
||||||
>
|
>
|
||||||
<router-link
|
<router-link
|
||||||
|
class="account-name"
|
||||||
:class="{ 'is-primary': !account.color, 'is-white': account.color }"
|
:class="{ 'is-primary': !account.color, 'is-white': account.color }"
|
||||||
:style="`color: ${findDarkValue(account.color || '')}`"
|
:style="`color: ${findDarkValue(account.color || '')}`"
|
||||||
:to="{ name: 'account', params: { id: account._id } }"
|
:to="{ name: 'account', params: { id: account._id } }"
|
||||||
>{{ account.name }}</router-link
|
>{{ account.name }}</router-link>
|
||||||
>
|
<span v-if="account.isPublic">
|
||||||
<span v-if="account.isPublic"> <awe-icon icon="users" /> </span>
|
|
||||||
<div class="numeric">
|
<awe-icon icon="users" />
|
||||||
{{ totalCost | moneypad(account.mainCurrency, false) }}
|
</span>
|
||||||
</div>
|
<div class="numeric">{{ totalCost | moneypad(account.mainCurrency, false) }}</div>
|
||||||
{{ account.users && account.users.map((u) => u.alias).join(', ') }}
|
<div class="account-users">{{ account.users && account.users.map((u) => u.alias).join(', ') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ import transactionService from '../services/TransactionService'
|
|||||||
import TransactionType from '../enums/TransactionType'
|
import TransactionType from '../enums/TransactionType'
|
||||||
import colors from '../data/colors'
|
import colors from '../data/colors'
|
||||||
|
|
||||||
const GRADIENT = true
|
const GRADIENT = false
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class AccountCard extends Vue {
|
export default class AccountCard extends Vue {
|
||||||
@@ -78,19 +79,19 @@ export default class AccountCard extends Vue {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '../styles/variables';
|
@import '../styles/variables';
|
||||||
|
|
||||||
.ct-chart {
|
.account-name {
|
||||||
.ct-series-a {
|
font-weight: bold;
|
||||||
.ct-bar {
|
|
||||||
stroke: blue;
|
|
||||||
stroke-width: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box,
|
||||||
|
.box:not(:last-child) {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
hyphens: auto;
|
hyphens: auto;
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
@@ -99,5 +100,8 @@ export default class AccountCard extends Vue {
|
|||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.account-users {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="account-list">
|
<div class="account-list">
|
||||||
<div class="account-grid" v-if="accounts.length">
|
<div class="account-grid" v-if="accounts.length">
|
||||||
<div v-for="(account, k) in accounts" :key="k">
|
<account-card v-for="(account, k) in accounts" :key="k" :account="account" />
|
||||||
<account-card :account="account" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="fetched">
|
<div v-else-if="fetched">
|
||||||
<awe-icon icon="inbox" /> Les comptes créés s'afficheront ici.
|
<awe-icon icon="inbox" /> Les comptes créés s'afficheront ici.
|
||||||
@@ -57,8 +55,7 @@ export default class AccountList extends Vue {
|
|||||||
display: grid;
|
display: grid;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
margin: 0 1rem;
|
margin: 0 1rem;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||||||
grid-auto-rows: 120px;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
pwa: {
|
pwa: {
|
||||||
themeColor: '#3f4fa6',
|
themeColor: '#3f4fa6',
|
||||||
msTileColor: '#3f4fa6',,
|
msTileColor: '#3f4fa6',
|
||||||
workboxOptions: {
|
workboxOptions: {
|
||||||
skipWaiting: true,
|
skipWaiting: true,
|
||||||
clientsClaim: true
|
clientsClaim: true
|
||||||
|
|||||||
Reference in New Issue
Block a user