fix(cog): memperbaiki kondisi untuk show harga jual
This commit is contained in:
parent
44697030f8
commit
88217e548e
@ -66,7 +66,7 @@ public function columns(): array
|
|||||||
->searchable()
|
->searchable()
|
||||||
->sortable()
|
->sortable()
|
||||||
->html()
|
->html()
|
||||||
->hideIf(auth()->user()->cannot('view cogs')),
|
->hideIf(! auth()->user()->hasRole(['Developer', 'Owner'])),
|
||||||
|
|
||||||
Column::make('Harga Jual', 'sale_price')
|
Column::make('Harga Jual', 'sale_price')
|
||||||
->label(fn ($row, $column) => currency($row->sale_price, 'Rp'))
|
->label(fn ($row, $column) => currency($row->sale_price, 'Rp'))
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public function columns(): array
|
|||||||
->searchable()
|
->searchable()
|
||||||
->sortable()
|
->sortable()
|
||||||
->html()
|
->html()
|
||||||
->hideIf(auth()->user()->cannot('view cogs')),
|
->hideIf(! auth()->user()->hasRole(['Developer', 'Owner'])),
|
||||||
|
|
||||||
Column::make('Harga Jual', 'sale_price')
|
Column::make('Harga Jual', 'sale_price')
|
||||||
->label(fn ($row, $column) => currency($row->sale_price, 'Rp'))
|
->label(fn ($row, $column) => currency($row->sale_price, 'Rp'))
|
||||||
|
|||||||
@ -65,7 +65,7 @@ public function columns(): array
|
|||||||
->searchable()
|
->searchable()
|
||||||
->sortable()
|
->sortable()
|
||||||
->html()
|
->html()
|
||||||
->hideIf(auth()->user()->cannot('view cogs')),
|
->hideIf(! auth()->user()->hasRole(['Developer', 'Owner'])),
|
||||||
|
|
||||||
Column::make('Harga Jual', 'sale_price')
|
Column::make('Harga Jual', 'sale_price')
|
||||||
->label(fn ($row, $column) => currency($row->sale_price, 'Rp'))
|
->label(fn ($row, $column) => currency($row->sale_price, 'Rp'))
|
||||||
|
|||||||
@ -32,18 +32,19 @@
|
|||||||
<flux:error name="form.size" />
|
<flux:error name="form.size" />
|
||||||
</flux:field>
|
</flux:field>
|
||||||
|
|
||||||
@can('view cogs')
|
@if (auth()->user()->hasRole(['Developer', 'Owner']))
|
||||||
<flux:field>
|
<flux:field>
|
||||||
<flux:label>Harga Beli <span class="text-red-500 ms-1">*</span></flux:label>
|
<flux:label>Harga Beli <span class="text-red-500 ms-1">*</span></flux:label>
|
||||||
<flux:input.group>
|
<flux:input.group>
|
||||||
<flux:input.group.prefix>Rp</flux:input.group.prefix>
|
<flux:input.group.prefix>Rp</flux:input.group.prefix>
|
||||||
<flux:input placeholder="Masukkan harga beli"
|
<flux:input placeholder="Masukkan harga beli"
|
||||||
x-mask:dynamic="$money($input, ',')"
|
x-mask:dynamic="$money($input, ',')"
|
||||||
wire:model.live.debounce.500ms="form.cost_price" autocomplete="off" />
|
wire:model.live.debounce.500ms="form.cost_price"
|
||||||
|
autocomplete="off" />
|
||||||
</flux:input.group>
|
</flux:input.group>
|
||||||
<flux:error name="form.cost_price" />
|
<flux:error name="form.cost_price" />
|
||||||
</flux:field>
|
</flux:field>
|
||||||
@endcan
|
@endif
|
||||||
|
|
||||||
<flux:field
|
<flux:field
|
||||||
class="col-span-{{ auth()->user()->hasRole(['Developer', 'Owner'])? '1': '2' }}">
|
class="col-span-{{ auth()->user()->hasRole(['Developer', 'Owner'])? '1': '2' }}">
|
||||||
|
|||||||
@ -43,19 +43,20 @@ class="grid grid-cols-1 md:grid-cols-{{ auth()->user()->hasRole(['Developer', 'O
|
|||||||
@endforeach
|
@endforeach
|
||||||
</flux:select>
|
</flux:select>
|
||||||
|
|
||||||
@can('view cogs')
|
@if (auth()->user()->hasRole(['Developer', 'Owner']))
|
||||||
<flux:field>
|
<flux:field>
|
||||||
<flux:label>Harga Beli <span class="text-red-500 ms-1">*</span>
|
<flux:label>Harga Beli <span class="text-red-500 ms-1">*</span>
|
||||||
</flux:label>
|
</flux:label>
|
||||||
<flux:input.group>
|
<flux:input.group>
|
||||||
<flux:input.group.prefix>Rp</flux:input.group.prefix>
|
<flux:input.group.prefix>Rp</flux:input.group.prefix>
|
||||||
<flux:input placeholder="xxx" x-mask:dynamic="$money($input, ',')"
|
<flux:input placeholder="xxx"
|
||||||
|
x-mask:dynamic="$money($input, ',')"
|
||||||
wire:model.live.debounce.500ms="form.cost_price"
|
wire:model.live.debounce.500ms="form.cost_price"
|
||||||
autocomplete="off" />
|
autocomplete="off" />
|
||||||
</flux:input.group>
|
</flux:input.group>
|
||||||
<flux:error name="form.cost_price" />
|
<flux:error name="form.cost_price" />
|
||||||
</flux:field>
|
</flux:field>
|
||||||
@endcan
|
@endif
|
||||||
|
|
||||||
<flux:field>
|
<flux:field>
|
||||||
<flux:label>Harga Jual <span class="text-red-500 ms-1">*</span>
|
<flux:label>Harga Jual <span class="text-red-500 ms-1">*</span>
|
||||||
|
|||||||
@ -32,18 +32,19 @@
|
|||||||
<flux:error name="form.sku" />
|
<flux:error name="form.sku" />
|
||||||
</flux:field>
|
</flux:field>
|
||||||
|
|
||||||
@can('view cogs')
|
@if (auth()->user()->hasRole(['Developer', 'Owner']))
|
||||||
<flux:field>
|
<flux:field>
|
||||||
<flux:label>Harga Beli <span class="text-red-500 ms-1">*</span></flux:label>
|
<flux:label>Harga Beli <span class="text-red-500 ms-1">*</span></flux:label>
|
||||||
<flux:input.group>
|
<flux:input.group>
|
||||||
<flux:input.group.prefix>Rp</flux:input.group.prefix>
|
<flux:input.group.prefix>Rp</flux:input.group.prefix>
|
||||||
<flux:input placeholder="Masukkan harga beli"
|
<flux:input placeholder="Masukkan harga beli"
|
||||||
x-mask:dynamic="$money($input, ',')"
|
x-mask:dynamic="$money($input, ',')"
|
||||||
wire:model.live.debounce.500ms="form.cost_price" autocomplete="off" />
|
wire:model.live.debounce.500ms="form.cost_price"
|
||||||
|
autocomplete="off" />
|
||||||
</flux:input.group>
|
</flux:input.group>
|
||||||
<flux:error name="form.cost_price" />
|
<flux:error name="form.cost_price" />
|
||||||
</flux:field>
|
</flux:field>
|
||||||
@endcan
|
@endif
|
||||||
|
|
||||||
<flux:field
|
<flux:field
|
||||||
class="col-span-{{ auth()->user()->hasRole(['Developer', 'Owner'])? '1': '2' }}">
|
class="col-span-{{ auth()->user()->hasRole(['Developer', 'Owner'])? '1': '2' }}">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user