chore(barbershop,customer,user): menghapus fungsi generateActionButtons di controller dan menyesuaikan pesan nitifikasi untuk update
This commit is contained in:
parent
255a70a923
commit
fee12c0b1e
@ -63,7 +63,7 @@ public function update(Barbershop $barbershop, BarbershopRequest $request): Redi
|
||||
}
|
||||
});
|
||||
|
||||
notify()->success('Data berhasil ditambahkan', 'Berhasil');
|
||||
notify()->success('Data berhasil diubah', 'Berhasil');
|
||||
|
||||
return redirect('dashboard/master/barbershop');
|
||||
}
|
||||
@ -81,38 +81,4 @@ public function delete(Barbershop $barbershop): RedirectResponse
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function generateActionButtons(Barbershop $barbershop): string
|
||||
{
|
||||
$editUrl = route('master.barbershop.edit', encryptId($barbershop->id));
|
||||
$deleteUrl = route('master.barbershop.delete', encryptId($barbershop->id));
|
||||
|
||||
return '
|
||||
<div class="nk-tb-col nk-tb-col-tools">
|
||||
<ul class="nk-tb-actions gx-1 my-n1">
|
||||
<li>
|
||||
<div class="drodown">
|
||||
<a href="#" class="dropdown-toggle btn btn-icon btn-trigger me-n1" data-bs-toggle="dropdown"><em class="icon ni ni-more-h"></em></a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<ul class="link-list-opt no-bdr">
|
||||
<li>
|
||||
<a href="'.$editUrl.'">
|
||||
<em class="icon ni ni-edit"></em>
|
||||
<span>Edit</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<form action="'.$deleteUrl.'" method="post">
|
||||
'.csrf_field().'
|
||||
'.method_field('delete').'
|
||||
<a href="javascript:void(0)" class="delete"><em class="icon ni ni-trash"></em><span>Hapus</span></a>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ public function update(Customer $customer, CustomerRequest $request): RedirectRe
|
||||
|
||||
$customer->update($validatedData);
|
||||
|
||||
notify()->success('Data berhasil ditambahkan', 'Berhasil');
|
||||
notify()->success('Data berhasil diubah', 'Berhasil');
|
||||
|
||||
return redirect('dashboard/master/customers');
|
||||
}
|
||||
@ -55,38 +55,4 @@ public function delete(Customer $customer): RedirectResponse
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function generateActionButtons(Customer $customer): string
|
||||
{
|
||||
$editUrl = route('master.customer.edit', encryptId($customer->id));
|
||||
$deleteUrl = route('master.customer.delete', encryptId($customer->id));
|
||||
|
||||
return '
|
||||
<div class="nk-tb-col nk-tb-col-tools">
|
||||
<ul class="nk-tb-actions gx-1 my-n1">
|
||||
<li>
|
||||
<div class="drodown">
|
||||
<a href="#" class="dropdown-toggle btn btn-icon btn-trigger me-n1" data-bs-toggle="dropdown"><em class="icon ni ni-more-h"></em></a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<ul class="link-list-opt no-bdr">
|
||||
<li>
|
||||
<a href="'.$editUrl.'">
|
||||
<em class="icon ni ni-edit"></em>
|
||||
<span>Edit</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<form action="'.$deleteUrl.'" method="post">
|
||||
'.csrf_field().'
|
||||
'.method_field('delete').'
|
||||
<a href="javascript:void(0)" class="delete"><em class="icon ni ni-trash"></em><span>Hapus</span></a>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ public function update(User $user, UserRequest $request): RedirectResponse
|
||||
}
|
||||
});
|
||||
|
||||
notify()->success('Data berhasil ditambahkan', 'Berhasil');
|
||||
notify()->success('Data berhasil diubah', 'Berhasil');
|
||||
|
||||
return redirect('dashboard/master/users');
|
||||
}
|
||||
@ -138,38 +138,4 @@ public function activation(User $user): RedirectResponse
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function generateActionButtons(User $user): string
|
||||
{
|
||||
$editUrl = route('master.user.edit', encryptId($user->id));
|
||||
$deleteUrl = route('master.user.delete', encryptId($user->id));
|
||||
|
||||
return '
|
||||
<div class="nk-tb-col nk-tb-col-tools">
|
||||
<ul class="nk-tb-actions gx-1 my-n1">
|
||||
<li>
|
||||
<div class="drodown">
|
||||
<a href="#" class="dropdown-toggle btn btn-icon btn-trigger me-n1" data-bs-toggle="dropdown"><em class="icon ni ni-more-h"></em></a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<ul class="link-list-opt no-bdr">
|
||||
<li>
|
||||
<a href="'.$editUrl.'">
|
||||
<em class="icon ni ni-edit"></em>
|
||||
<span>Edit</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<form action="'.$deleteUrl.'" method="post">
|
||||
'.csrf_field().'
|
||||
'.method_field('delete').'
|
||||
<a href="javascript:void(0)" class="delete"><em class="icon ni ni-trash"></em><span>Hapus</span></a>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user