Feature: Lazy loading
Lazy loaded everything TODO: The cash flow module when clicking on sub-links, it reloads the whole page, it needs to be diagnosed and fixed, this problem also exists in the other modules TODO: Rename folders and modules such as account to accounts to match the url
This commit is contained in:
@@ -8,7 +8,7 @@ import {AttendanceTypeResolver} from '../attendance/attendance-type-resolver.ser
|
||||
|
||||
const employeeEmployeeAttendanceRoutes: Routes = [
|
||||
{
|
||||
path: 'EmployeeAttendance',
|
||||
path: '',
|
||||
component: EmployeeAttendanceComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
@@ -21,7 +21,7 @@ const employeeEmployeeAttendanceRoutes: Routes = [
|
||||
runGuardsAndResolvers: 'always'
|
||||
},
|
||||
{
|
||||
path: 'EmployeeAttendance/:id',
|
||||
path: ':id',
|
||||
component: EmployeeAttendanceComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
|
||||
@@ -113,7 +113,7 @@ export class EmployeeAttendanceComponent implements OnInit, AfterViewInit {
|
||||
const formValue = this.form.value;
|
||||
this.info.startDate = moment(formValue.startDate).format('DD-MMM-YYYY');
|
||||
this.info.finishDate = moment(formValue.finishDate).format('DD-MMM-YYYY');
|
||||
this.router.navigate(['EmployeeAttendance', this.info.employee.id], {
|
||||
this.router.navigate(['/employee-attendance', this.info.employee.id], {
|
||||
queryParams: {
|
||||
startDate: this.info.startDate,
|
||||
finishDate: this.info.finishDate
|
||||
|
||||
@@ -9,8 +9,8 @@ const httpOptions = {
|
||||
headers: new HttpHeaders({'Content-Type': 'application/json'})
|
||||
};
|
||||
|
||||
const url = '/api/EmployeeAttendance';
|
||||
const serviceName = 'AttendanceService';
|
||||
const url = '/api/employee-attendance';
|
||||
const serviceName = 'EmployeeAttendanceService';
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class EmployeeAttendanceService {
|
||||
|
||||
Reference in New Issue
Block a user