feature: form upload reklame
This commit is contained in:
@@ -57,11 +57,13 @@ class GeneralTable {
|
||||
if (event.target && event.target.classList.contains('btn-edit')) {
|
||||
this.handleEdit(event);
|
||||
}
|
||||
if (event.target && event.target.classList.contains('btn-delete')) {
|
||||
else if (event.target && event.target.classList.contains('btn-delete')) {
|
||||
this.handleDelete(event);
|
||||
}
|
||||
if (event.target && event.target.classList.contains('btn-create')) {
|
||||
else if (event.target && event.target.classList.contains('btn-create')) {
|
||||
this.handleCreate(event);
|
||||
} else if (event.target && event.target.classList.contains('btn-bulk-create')) {
|
||||
this.handleBulkCreate(event);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -73,6 +75,12 @@ class GeneralTable {
|
||||
window.location.href = `${this.baseUrl}/${model}/create`;
|
||||
}
|
||||
|
||||
handleBulkCreate(event) {
|
||||
// Menggunakan model dan ID untuk membangun URL dinamis
|
||||
const model = event.target.getAttribute('data-model');
|
||||
window.location.href = `${this.baseUrl}/${model}/bulk-create`;
|
||||
}
|
||||
|
||||
// Fungsi untuk menangani edit
|
||||
handleEdit(event) {
|
||||
const id = event.target.getAttribute('data-id');
|
||||
|
||||
Reference in New Issue
Block a user