Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/app/modules/manufacturing/manufacturing-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { RouterModule, Routes } from '@angular/router';
import { ManufacturingComponent } from './manufacturing.component';
import { NewdcComponent } from './newdc/newdc.component';
import { NewgrnComponent } from './newgrn/newgrn.component';
import { PurchaseOrderListComponent } from './purchase-order/purchase-order-list/purchase-order-list.component';
import { PurchaseOrderComponent } from './purchase-order/purchase-order/purchase-order.component';
import { ViewdcComponent } from './viewdc/viewdc.component';
import { ViewgrnComponent } from './viewgrn/viewgrn.component';

Expand All @@ -15,6 +17,8 @@ const routes: Routes = [
{ path: 'viewdc', component: ViewdcComponent },
{ path: 'newgrn', component: NewgrnComponent },
{ path: 'viewgrn', component: ViewgrnComponent },
{ path: 'purchase-order/purchase-order-list', component: PurchaseOrderListComponent },
{ path: 'purchase-order/new-purchase-order', component: PurchaseOrderComponent },
{ path: '', redirectTo: 'newdc', pathMatch: 'full' },
],
},
Expand Down
1 change: 1 addition & 0 deletions src/app/modules/manufacturing/manufacturing.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class ManufacturingComponent implements OnInit {
{ name: 'View DC', path: '/home/mfg/viewdc' },
{ name: 'New GRN', path: '/home/mfg/newgrn' },
{ name: 'View GRN', path: '/home/mfg/viewgrn' },
{ name: 'Purchase Order', path: '/home/mfg/purchase-order/purchase-order-list' }
];

constructor() {}
Expand Down
16 changes: 13 additions & 3 deletions src/app/modules/manufacturing/manufacturing.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ManufacturingRoutingModule } from './manufacturing-routing.module';
import { ManufacturingComponent } from './manufacturing.component';
import { NewdcComponent } from './newdc/newdc.component';
import { ViewdcComponent } from './viewdc/viewdc.component';
import { NewgrnComponent } from './newgrn/newgrn.component';
import { ViewgrnComponent } from './viewgrn/viewgrn.component';
import { NavbarModule } from 'src/app/shared/navbar/navbar.module';
import { PurchaseOrderListComponent } from './purchase-order/purchase-order-list/purchase-order-list.component';
import { PurchaseOrderComponent } from './purchase-order/purchase-order/purchase-order.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';


@NgModule({
Expand All @@ -16,12 +20,18 @@ import { NavbarModule } from 'src/app/shared/navbar/navbar.module';
NewdcComponent,
ViewdcComponent,
NewgrnComponent,
ViewgrnComponent
ViewgrnComponent,
PurchaseOrderListComponent,
PurchaseOrderComponent
],
imports: [
CommonModule,
ManufacturingRoutingModule,
NavbarModule
NavbarModule,
NgbModule,
ReactiveFormsModule,
FormsModule,
NgMultiSelectDropDownModule.forRoot()
]
})
export class ManufacturingModule { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="row mt-3">
<div class="col-7">
<h5>Purchase Order</h5>
</div>
<div class="col-5 text-right">
<button type="button" class="btn btn-primary btn-sm pull-right" (click)="navigateToPO()">
<i class="fa fa-plus"></i>
<span class="d-none d-md-inline"> Add Purchase Order</span>
</button>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { PurchaseOrderListComponent } from './purchase-order-list.component';

describe('PurchaseOrderListComponent', () => {
let component: PurchaseOrderListComponent;
let fixture: ComponentFixture<PurchaseOrderListComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PurchaseOrderListComponent ]
})
.compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(PurchaseOrderListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

@Component({
selector: 'app-purchase-order-list',
templateUrl: './purchase-order-list.component.html',
styleUrls: ['./purchase-order-list.component.scss']
})
export class PurchaseOrderListComponent implements OnInit {

constructor(private router: Router) { }

ngOnInit(): void {
}
navigateToPO(){
var previous_url = this.router.url.substr(this.router.url.lastIndexOf('/') + 1) + '$';
var current_url = this.router.url.replace( new RegExp(previous_url), 'new-purchase-order' );
this.router.navigateByUrl(current_url);
}

}
Loading