🐛 (moneypad) fix and make the multi currency works!

This commit is contained in:
Julien Calixte
2020-03-15 17:26:35 +01:00
parent cab5a4e46d
commit 99bdcff0ef
3 changed files with 7 additions and 20 deletions

View File

@@ -17,8 +17,9 @@
v-for="(user, k) in account.users" v-for="(user, k) in account.users"
:key="k" :key="k"
:value="user.alias" :value="user.alias"
>{{ user.alias }}</option
> >
{{ user.alias }}
</option>
</select> </select>
</div> </div>
</div> </div>

View File

@@ -23,12 +23,13 @@ export const moneypad = (
): string => { ): string => {
const m = money(value, currency) const m = money(value, currency)
const s: string[] = m.split('\xa0') const s: string[] = m.split('\xa0')
const cur: string | undefined = s.pop() let cur: string | undefined = s.pop()
if (withPadEnd) {
cur = (cur || '').padEnd(3, '\xa0')
}
const result = `${s.join('\xa0')}\xa0${cur || ''}` const result = `${s.join('\xa0')}\xa0${cur || ''}`
if (withPadEnd) {
return result.padEnd(3, '\xa0')
}
return result return result
} }

View File

@@ -85,15 +85,6 @@
<awe-icon icon="balance-scale" /> <awe-icon icon="balance-scale" />
</a> </a>
</li> </li>
<li v-if="isMultiUser">
<a
:style="colorStyle(activeTab === 'refund')"
href="#"
@click.prevent="toggleTab('refund')"
>
<awe-icon icon="exchange-alt" />
</a>
</li>
</ul> </ul>
</div> </div>
<div <div
@@ -130,12 +121,6 @@
:stats="userStats" :stats="userStats"
:currency="account.mainCurrency" :currency="account.mainCurrency"
/> />
</div>
<div
key="refund"
class="refund-panel tab-content is-centered"
v-if="activeTab === 'refund'"
>
<div <div
v-if="userRefunds.length" v-if="userRefunds.length"
class="refund-container no-margin columns is-centered is-multiline" class="refund-container no-margin columns is-centered is-multiline"