mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-15 19:09:50 +00:00
Replace native with primary where possible
This commit is contained in:
@@ -59,11 +59,11 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-4 col-form-label">Convert to native</label>
|
||||
<label class="col-sm-4 col-form-label">Convert to primary</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-check form-switch form-check-inline">
|
||||
<label>
|
||||
<input class="form-check-input" x-model="convertToNative" type="checkbox" @change="saveNativeSettings"> <span
|
||||
<input class="form-check-input" x-model="convertToPrimary" type="checkbox" @change="savePrimarySettings"> <span
|
||||
>Yes no</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<ul class="list-unstyled list-no-margin">
|
||||
<template x-for="transaction in group.transactions">
|
||||
<li>
|
||||
@include('partials.elements.amount', ['convertToNative' => true,'type' => 'transaction.type','amount' => 'transaction.amount','native' => 'transaction.amount'])
|
||||
@include('partials.elements.amount', ['convertToPrimary' => true,'type' => 'transaction.type','amount' => 'transaction.amount','primary' => 'transaction.amount'])
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
@if($convertToNative)
|
||||
<template x-if="convertToNative">
|
||||
@if($convertToPrimary)
|
||||
<template x-if="convertToPrimary">
|
||||
<span>
|
||||
<template x-if="{{ $native }}_raw < 0">
|
||||
<template x-if="{{ $primary }}_raw < 0">
|
||||
<span class="text-danger">
|
||||
<span x-text="{{ $native }}"></span>
|
||||
<span x-text="{{ $primary }}"></span>
|
||||
</span>
|
||||
</template>
|
||||
<template x-if="{{ $native }}_raw >= 0">
|
||||
<template x-if="{{ $primary }}_raw >= 0">
|
||||
<template x-if="'transfer' === {{ $type }}">
|
||||
<span class="text-primary">
|
||||
<span x-text="{{ $native }}"></span>
|
||||
<span x-text="{{ $primary }}"></span>
|
||||
</span>
|
||||
</template>
|
||||
<template x-if="'transfer' !== {{ $type }}">
|
||||
<span class="text-success">
|
||||
<span x-text="{{ $native }}"></span>
|
||||
<span x-text="{{ $primary }}"></span>
|
||||
</span>
|
||||
</template>
|
||||
</template>
|
||||
</span>
|
||||
</template>
|
||||
<template x-if="!convertToNative">
|
||||
<template x-if="!convertToPrimary">
|
||||
<span>
|
||||
<template x-if="{{ $amount }}_raw < 0">
|
||||
|
||||
<span>
|
||||
<template x-if="'transfer' === {{ $type }}">
|
||||
<span class="text-primary">
|
||||
<span x-text="{{ $native }}"></span>
|
||||
<span x-text="{{ $primary }}"></span>
|
||||
</span>
|
||||
</template>
|
||||
<template x-if="'transfer' !== {{ $type }}">
|
||||
<span class="text-danger">
|
||||
<span x-text="{{ $native }}"></span>
|
||||
<span x-text="{{ $primary }}"></span>
|
||||
</span>
|
||||
</template>
|
||||
</span>
|
||||
@@ -43,12 +43,12 @@
|
||||
<span>
|
||||
<template x-if="'transfer' === {{ $type }}">
|
||||
<span class="text-primary">
|
||||
<span x-text="{{ $native }}"></span>
|
||||
<span x-text="{{ $primary }}"></span>
|
||||
</span>
|
||||
</template>
|
||||
<template x-if="'transfer' !== {{ $type }}">
|
||||
<span class="text-success">
|
||||
<span x-text="{{ $native }}"></span>
|
||||
<span x-text="{{ $primary }}"></span>
|
||||
</span>
|
||||
</template>
|
||||
</span>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<!-- is no longer loading currencies -->
|
||||
<template x-if="!formStates.loadingCurrencies">
|
||||
<select class="form-control" :id="'currency_code_' + index" x-model="transaction.currency_code">
|
||||
<template x-for="currency in formData.nativeCurrencies">
|
||||
<option :selected="currency.id == formData.defaultCurrency.id"
|
||||
<template x-for="currency in formData.primaryCurrencies">
|
||||
<option :selected="currency.id == formData.primaryCurrency.id"
|
||||
:label="currency.name" :value="currency.code"
|
||||
x-text="currency.name"></option>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user