update approval currency
This commit is contained in:
parent
1d8bed3118
commit
477c993843
@ -90,6 +90,7 @@
|
|||||||
{
|
{
|
||||||
$_model = [
|
$_model = [
|
||||||
'Parameter Cabang' => 'Branch',
|
'Parameter Cabang' => 'Branch',
|
||||||
|
'Parameter Mata Uang' => 'Currency',
|
||||||
];
|
];
|
||||||
try {
|
try {
|
||||||
$approval = Approval::findOrFail($id);
|
$approval = Approval::findOrFail($id);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
protected $listeners = [
|
protected $listeners = [
|
||||||
'delete' => 'delete',
|
'delete' => 'delete',
|
||||||
'update' => 'update',
|
'update' => 'update',
|
||||||
'reload' => 'reload',
|
'reload' => 'reload',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
@ -46,6 +46,9 @@
|
|||||||
// Emit a success event with a message
|
// Emit a success event with a message
|
||||||
$currency = Currency::find($this->id);
|
$currency = Currency::find($this->id);
|
||||||
|
|
||||||
|
$data['updated_by'] = auth()->user()->id;
|
||||||
|
$data['updated_at'] = now();
|
||||||
|
|
||||||
$approval = [
|
$approval = [
|
||||||
'method' => 'update',
|
'method' => 'update',
|
||||||
'menu' => 'Parameter Mata Uang',
|
'menu' => 'Parameter Mata Uang',
|
||||||
@ -70,6 +73,8 @@
|
|||||||
$this->dispatch('success', 'Data Berhasil Di Update, Menunggu Approval');
|
$this->dispatch('success', 'Data Berhasil Di Update, Menunggu Approval');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$data['created_by'] = auth()->user()->id;
|
||||||
|
$data['created_at'] = now();
|
||||||
// Emit a success event with a message
|
// Emit a success event with a message
|
||||||
$approval = [
|
$approval = [
|
||||||
'method' => 'create',
|
'method' => 'create',
|
||||||
@ -115,6 +120,10 @@
|
|||||||
|
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
|
$old = Currency::find($id);
|
||||||
|
unset($old->deleted_at);
|
||||||
|
unset($old->deleted_by);
|
||||||
|
|
||||||
$curency = Currency::find($id);
|
$curency = Currency::find($id);
|
||||||
$curency->delete_by = auth()->user()->id;
|
$curency->delete_by = auth()->user()->id;
|
||||||
$curency->deleted_at = now();
|
$curency->deleted_at = now();
|
||||||
@ -122,6 +131,7 @@
|
|||||||
$approval = [
|
$approval = [
|
||||||
'method' => 'delete',
|
'method' => 'delete',
|
||||||
'menu' => 'Parameter Mata uang',
|
'menu' => 'Parameter Mata uang',
|
||||||
|
'new_request' => json_encode($curency),
|
||||||
'old_request' => json_encode($curency),
|
'old_request' => json_encode($curency),
|
||||||
'description' => 'Delete Parameter Mata uang',
|
'description' => 'Delete Parameter Mata uang',
|
||||||
'status' => '0',
|
'status' => '0',
|
||||||
|
Loading…
Reference in New Issue
Block a user