feat(currency): tambahkan atribut simbol dan perbarui tampilan
- Menambahkan kolom simbol pada tabel mata uang di halaman index. - Menambahkan input simbol pada form pembuatan mata uang. - Memperbarui aturan validasi untuk simbol pada CurrencyRequest. - Memperbarui model Currency untuk menyertakan atribut simbol. - Memperbarui migrasi untuk menambahkan kolom simbol pada tabel currencies.
This commit is contained in:
@@ -46,6 +46,17 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Symbol
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('symbol') border-danger bg-danger-light @enderror" type="text" name="symbol" value="{{ $currency->symbol ?? '' }}">
|
||||
@error('symbol')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Decimal Places
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
<span class="sort"> <span class="sort-label"> Mata Uang </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="symbol">
|
||||
<span class="sort"> <span class="sort-label"> Symbol </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[50px]" data-datatable-column="decimal_places">
|
||||
<span class="sort"> <span class="sort-label"> Decimal Places </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
@@ -126,7 +130,7 @@
|
||||
|
||||
$.ajax('{{ route("basicdata.currency.deleteMultiple") }}', {
|
||||
type: 'POST',
|
||||
data: { ids: ids }
|
||||
data: {ids: ids}
|
||||
}).then((response) => {
|
||||
Swal.fire('Deleted!', 'Selected rows have been deleted.', 'success').then(() => {
|
||||
window.location.reload();
|
||||
@@ -165,6 +169,9 @@
|
||||
name: {
|
||||
title: 'Mata Uang',
|
||||
},
|
||||
symbol: {
|
||||
title: 'Symbol',
|
||||
},
|
||||
decimal_places: {
|
||||
title: 'Decimal Places',
|
||||
},
|
||||
@@ -204,7 +211,7 @@
|
||||
updateDeleteButtonVisibility();
|
||||
|
||||
// Add event listener to the table for checkbox changes
|
||||
element.addEventListener('change', function(event) {
|
||||
element.addEventListener('change', function (event) {
|
||||
if (event.target.matches('input[data-datatable-row-check="true"]')) {
|
||||
updateDeleteButtonVisibility();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user