mirror of
https://github.com/Nezumi-2711/javascript-training.git
synced 2026-09-22 13:38:43 +00:00
Fix category not load
This commit is contained in:
@@ -32,6 +32,7 @@ export default class HomeController {
|
|||||||
if (this.homeView) {
|
if (this.homeView) {
|
||||||
this.homeView.addHandlerEventWalletForm(
|
this.homeView.addHandlerEventWalletForm(
|
||||||
this.handlerSaveWallet.bind(this),
|
this.handlerSaveWallet.bind(this),
|
||||||
|
this.handlerGetAllCategory.bind(this),
|
||||||
);
|
);
|
||||||
|
|
||||||
this.homeView.loadPage(
|
this.homeView.loadPage(
|
||||||
|
|||||||
@@ -298,11 +298,11 @@ export default class HomeView extends CommonView {
|
|||||||
// ---------------------END DIALOG---------------------//
|
// ---------------------END DIALOG---------------------//
|
||||||
|
|
||||||
// ---------------------WALLET DIALOG--------------------- //
|
// ---------------------WALLET DIALOG--------------------- //
|
||||||
addHandlerEventWalletForm(saveWallet) {
|
addHandlerEventWalletForm(saveWallet, getAllCategory) {
|
||||||
this.walletDialog.addEventListener('submit', (e) => {
|
this.walletDialog.addEventListener('submit', (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
this.submitWalletForm(saveWallet);
|
this.submitWalletForm(saveWallet, getAllCategory);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.walletDialog.addEventListener('input', (e) => {
|
this.walletDialog.addEventListener('input', (e) => {
|
||||||
@@ -311,7 +311,7 @@ export default class HomeView extends CommonView {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async submitWalletForm(saveWallet) {
|
async submitWalletForm(saveWallet, getAllCategory) {
|
||||||
this.walletDialog.close();
|
this.walletDialog.close();
|
||||||
this.toggleLoaderSpinner();
|
this.toggleLoaderSpinner();
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@ export default class HomeView extends CommonView {
|
|||||||
);
|
);
|
||||||
|
|
||||||
this.loadEvent(); // Load event page
|
this.loadEvent(); // Load event page
|
||||||
this.loadData(); // Load data from database into page
|
this.loadData(getAllCategory); // Load data from database into page
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Show toast error
|
// Show toast error
|
||||||
this.showErrorToast(error);
|
this.showErrorToast(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user