DbImage works!!

Credit Salary works!!

Refresh router created, now need to use it in angular

Errors should now show up in the frontend.
This commit is contained in:
tanshu committed 2020-05-30 01:58:17 +05:30
1 parent e3286c87ba
commit 10dbe6663d
34 files changed
+264 -233

No files matched your search

@@ -78,7 +78,7 @@ export class AccountDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/accounts');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -91,7 +91,7 @@ export class AccountDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/accounts');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -82,7 +82,7 @@ export class AttendanceComponent implements OnInit {
this.toaster.show('Success', '');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -69,7 +69,7 @@ export class ClientDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/clients');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -82,7 +82,7 @@ export class ClientDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/clients');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -22,7 +22,7 @@ export class ErrorLoggerService {
console.error(error); // log to console instead
// TODO: better job of transforming error for user consumption
this.log(serviceName, `${operation} failed: ${error.message}`);
this.log(serviceName, `${operation} failed: ${error}`);
// // Let the app keep running by returning an empty result.
// return of(result as T);
@@ -60,7 +60,7 @@ export class CostCentreDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/cost-centres');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -129,7 +129,7 @@ export class EmployeeAttendanceComponent implements OnInit, AfterViewInit {
this.toaster.show('Success', '');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -185,7 +185,7 @@ export class EmployeeBenefitsComponent implements OnInit, AfterViewInit {
this.toaster.show('Success', 'Voucher Posted');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -198,7 +198,7 @@ export class EmployeeBenefitsComponent implements OnInit, AfterViewInit {
this.router.navigate(['/employee-benefits', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -217,7 +217,7 @@ export class EmployeeBenefitsComponent implements OnInit, AfterViewInit {
this.router.navigate(['/employee-benefits'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -79,7 +79,8 @@ export class EmployeeFunctionsComponent implements OnInit {
this.toaster.show('Success', 'Salaries Credited');
},
(error) => {
this.toaster.show('Danger', error.error);
console.log('Error:', error);
this.toaster.show('Danger', error);
}
);
}
@@ -109,7 +110,7 @@ export class EmployeeFunctionsComponent implements OnInit {
this.toaster.show('Success', 'Fingerprints uploaded');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -90,7 +90,7 @@ export class EmployeeDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/employees');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -103,7 +103,7 @@ export class EmployeeDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/employees');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -140,7 +140,7 @@ export class IncentiveComponent implements OnInit {
this.toaster.show('Success', 'Voucher Posted');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -153,7 +153,7 @@ export class IncentiveComponent implements OnInit {
this.router.navigate(['/incentive', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -176,7 +176,7 @@ export class IncentiveComponent implements OnInit {
this.router.navigate(['/incentive'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
+2 -2
View File
@@ -223,7 +223,7 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/issue', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -249,7 +249,7 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/issue'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -218,7 +218,7 @@ export class JournalComponent implements OnInit, AfterViewInit, OnDestroy {
this.toaster.show('Success', 'Voucher Posted');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -232,7 +232,7 @@ export class JournalComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/journal', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -252,7 +252,7 @@ export class JournalComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/journal'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -222,7 +222,7 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
this.toaster.show('Success', 'Voucher Posted');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -236,7 +236,7 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/payment', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -257,7 +257,7 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/payment'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -60,7 +60,7 @@ export class ProductGroupDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/product-groups');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -87,7 +87,7 @@ export class ProductDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/products');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -100,7 +100,7 @@ export class ProductDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/products');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -209,7 +209,7 @@ export class PurchaseReturnComponent implements OnInit, AfterViewInit, OnDestroy
this.toaster.show('Success', 'Voucher Posted');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -223,7 +223,7 @@ export class PurchaseReturnComponent implements OnInit, AfterViewInit, OnDestroy
this.router.navigate(['/purchase-return', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -244,7 +244,7 @@ export class PurchaseReturnComponent implements OnInit, AfterViewInit, OnDestroy
this.router.navigate(['/purchase-return'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -222,7 +222,7 @@ export class PurchaseComponent implements OnInit, AfterViewInit, OnDestroy {
this.toaster.show('Success', 'Voucher Posted');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -236,7 +236,7 @@ export class PurchaseComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/purchase', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -257,7 +257,7 @@ export class PurchaseComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/purchase'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -221,7 +221,7 @@ export class ReceiptComponent implements OnInit, AfterViewInit, OnDestroy {
this.toaster.show('Success', 'Voucher Posted');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -235,7 +235,7 @@ export class ReceiptComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/receipt', result.id]);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -256,7 +256,7 @@ export class ReceiptComponent implements OnInit, AfterViewInit, OnDestroy {
this.router.navigate(['/receipt'], {replaceUrl: true});
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -65,7 +65,7 @@ export class RoleDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/roles');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -78,7 +78,7 @@ export class RoleDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/roles');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -132,7 +132,7 @@ export class SettingsComponent implements OnInit {
this.toaster.show('Success', 'Lock information Updated');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -162,7 +162,7 @@ export class SettingsComponent implements OnInit {
this.toaster.show('Success', 'Data has been rebased!');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -213,7 +213,7 @@ export class SettingsComponent implements OnInit {
this.toaster.show('Success', 'Stock has been reset!');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -227,7 +227,7 @@ export class SettingsComponent implements OnInit {
this.toaster.show('Success', 'Database checked, it is fine!');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -76,7 +76,7 @@ export class UserDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/users');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}
@@ -89,7 +89,7 @@ export class UserDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/users');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Danger', error);
}
);
}