diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 696a493..c8d228d 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -1,16 +1,18 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './login/login.component';
+import { WidgetsHolderComponent } from './widgets-holder/widgets-holder.component';
-const routes: Routes = [
- {
- path: "",
- redirectTo: "/login",
- pathMatch: "full"
- },
- {
- path: "login",
+const routes: Routes = [{
+ path: '',
+ redirectTo: '/login',
+ pathMatch: 'full'
+ },{
+ path: 'login',
component: LoginComponent
+ },{
+ path: 'shop-details',
+ component: WidgetsHolderComponent
},
];
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 6999914..a629c38 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
+import { Router } from '@angular/router';
@Component({
selector: 'app-root',
@@ -6,4 +7,11 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.scss']
})
export class AppComponent {
+ constructor(
+ public router: Router
+ ) {
+ if (localStorage.vendor_token) {
+ this.router.navigate(['shop-details']);
+ }
+ }
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 0cdde4a..dab925f 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -4,11 +4,23 @@ import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { LoginComponent } from './login/login.component';
+import { WidgetsHolderComponent } from './widgets-holder/widgets-holder.component';
+import { DashboardComponent } from './dashboard/dashboard.component';
+import { OrdersComponent } from './orders/orders.component';
+import { MenuItemsComponent } from './menu-items/menu-items.component';
+import { OffersComponent } from './offers/offers.component';
+import { SchedulesComponent } from './schedules/schedules.component';
@NgModule({
declarations: [
AppComponent,
- LoginComponent
+ LoginComponent,
+ WidgetsHolderComponent,
+ DashboardComponent,
+ OrdersComponent,
+ MenuItemsComponent,
+ OffersComponent,
+ SchedulesComponent
],
imports: [
BrowserModule,
diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html
new file mode 100644
index 0000000..9c5fce9
--- /dev/null
+++ b/src/app/dashboard/dashboard.component.html
@@ -0,0 +1 @@
+
dashboard works!
diff --git a/src/app/dashboard/dashboard.component.scss b/src/app/dashboard/dashboard.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/dashboard/dashboard.component.spec.ts b/src/app/dashboard/dashboard.component.spec.ts
new file mode 100644
index 0000000..9c996c3
--- /dev/null
+++ b/src/app/dashboard/dashboard.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DashboardComponent } from './dashboard.component';
+
+describe('DashboardComponent', () => {
+ let component: DashboardComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ DashboardComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(DashboardComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts
new file mode 100644
index 0000000..0824577
--- /dev/null
+++ b/src/app/dashboard/dashboard.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-dashboard',
+ templateUrl: './dashboard.component.html',
+ styleUrls: ['./dashboard.component.scss']
+})
+export class DashboardComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts
index 4f6b686..7d35501 100644
--- a/src/app/login/login.component.ts
+++ b/src/app/login/login.component.ts
@@ -16,7 +16,8 @@ export class LoginComponent implements OnInit {
}
authenticateUser() {
- this.router.navigate(['login']);
+ localStorage.vendor_token = 'a';
+ this.router.navigate(['shop-details']);
}
}
diff --git a/src/app/menu-items/menu-items.component.html b/src/app/menu-items/menu-items.component.html
new file mode 100644
index 0000000..a6f9825
--- /dev/null
+++ b/src/app/menu-items/menu-items.component.html
@@ -0,0 +1 @@
+menu-items works!
diff --git a/src/app/menu-items/menu-items.component.scss b/src/app/menu-items/menu-items.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/menu-items/menu-items.component.spec.ts b/src/app/menu-items/menu-items.component.spec.ts
new file mode 100644
index 0000000..2d48a50
--- /dev/null
+++ b/src/app/menu-items/menu-items.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { MenuItemsComponent } from './menu-items.component';
+
+describe('MenuItemsComponent', () => {
+ let component: MenuItemsComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ MenuItemsComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(MenuItemsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/menu-items/menu-items.component.ts b/src/app/menu-items/menu-items.component.ts
new file mode 100644
index 0000000..e517414
--- /dev/null
+++ b/src/app/menu-items/menu-items.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-menu-items',
+ templateUrl: './menu-items.component.html',
+ styleUrls: ['./menu-items.component.scss']
+})
+export class MenuItemsComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/offers/offers.component.html b/src/app/offers/offers.component.html
new file mode 100644
index 0000000..545fdc0
--- /dev/null
+++ b/src/app/offers/offers.component.html
@@ -0,0 +1 @@
+offers works!
diff --git a/src/app/offers/offers.component.scss b/src/app/offers/offers.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/offers/offers.component.spec.ts b/src/app/offers/offers.component.spec.ts
new file mode 100644
index 0000000..99cc2cf
--- /dev/null
+++ b/src/app/offers/offers.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { OffersComponent } from './offers.component';
+
+describe('OffersComponent', () => {
+ let component: OffersComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ OffersComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(OffersComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/offers/offers.component.ts b/src/app/offers/offers.component.ts
new file mode 100644
index 0000000..2b1e0c9
--- /dev/null
+++ b/src/app/offers/offers.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-offers',
+ templateUrl: './offers.component.html',
+ styleUrls: ['./offers.component.scss']
+})
+export class OffersComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/orders/orders.component.html b/src/app/orders/orders.component.html
new file mode 100644
index 0000000..66000b4
--- /dev/null
+++ b/src/app/orders/orders.component.html
@@ -0,0 +1 @@
+orders works!
diff --git a/src/app/orders/orders.component.scss b/src/app/orders/orders.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/orders/orders.component.spec.ts b/src/app/orders/orders.component.spec.ts
new file mode 100644
index 0000000..b8efbb0
--- /dev/null
+++ b/src/app/orders/orders.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { OrdersComponent } from './orders.component';
+
+describe('OrdersComponent', () => {
+ let component: OrdersComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ OrdersComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(OrdersComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/orders/orders.component.ts b/src/app/orders/orders.component.ts
new file mode 100644
index 0000000..de2ad68
--- /dev/null
+++ b/src/app/orders/orders.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-orders',
+ templateUrl: './orders.component.html',
+ styleUrls: ['./orders.component.scss']
+})
+export class OrdersComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/schedules/schedules.component.html b/src/app/schedules/schedules.component.html
new file mode 100644
index 0000000..a5ba571
--- /dev/null
+++ b/src/app/schedules/schedules.component.html
@@ -0,0 +1 @@
+schedules works!
diff --git a/src/app/schedules/schedules.component.scss b/src/app/schedules/schedules.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/schedules/schedules.component.spec.ts b/src/app/schedules/schedules.component.spec.ts
new file mode 100644
index 0000000..8467a81
--- /dev/null
+++ b/src/app/schedules/schedules.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SchedulesComponent } from './schedules.component';
+
+describe('SchedulesComponent', () => {
+ let component: SchedulesComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ SchedulesComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(SchedulesComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/schedules/schedules.component.ts b/src/app/schedules/schedules.component.ts
new file mode 100644
index 0000000..96af124
--- /dev/null
+++ b/src/app/schedules/schedules.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-schedules',
+ templateUrl: './schedules.component.html',
+ styleUrls: ['./schedules.component.scss']
+})
+export class SchedulesComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/widgets-holder/widgets-holder.component.html b/src/app/widgets-holder/widgets-holder.component.html
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/widgets-holder/widgets-holder.component.scss b/src/app/widgets-holder/widgets-holder.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/widgets-holder/widgets-holder.component.spec.ts b/src/app/widgets-holder/widgets-holder.component.spec.ts
new file mode 100644
index 0000000..4de72ab
--- /dev/null
+++ b/src/app/widgets-holder/widgets-holder.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { WidgetsHolderComponent } from './widgets-holder.component';
+
+describe('WidgetsHolderComponent', () => {
+ let component: WidgetsHolderComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ WidgetsHolderComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(WidgetsHolderComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/widgets-holder/widgets-holder.component.ts b/src/app/widgets-holder/widgets-holder.component.ts
new file mode 100644
index 0000000..1bf3336
--- /dev/null
+++ b/src/app/widgets-holder/widgets-holder.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-widgets-holder',
+ templateUrl: './widgets-holder.component.html',
+ styleUrls: ['./widgets-holder.component.scss']
+})
+export class WidgetsHolderComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}