stock view in studymaterial

This commit is contained in:
gayathri1990 2018-08-10 14:59:28 +05:30
parent b37e9acd0a
commit d0b252e381
9 changed files with 65 additions and 67 deletions

View File

@ -107,7 +107,7 @@
<!--/.col-->
</div>
<!--/.row-->
</div>
</div>
</tab>
<div bsModal #myModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

View File

@ -4,7 +4,6 @@ import { ReceivedmaterialComponent } from './receivedmaterial/receivedmaterial.c
import { AllocatematerialComponent } from './allocatematerial/allocatematerial.component';
import { StudymaterialstockComponent } from './studymaterialstock/studymaterialstock.component';
import { StudyMaterialComponent } from './study-material/study-material.component';
const routes: Routes = [
{
path: '',
@ -33,6 +32,7 @@ const routes: Routes = [
title: 'Studymaterialstock'
}
},
{
path: 'studyMaterialStatus',
component: StudyMaterialComponent,

View File

@ -12,6 +12,7 @@ import { ReceivedmaterialComponent } from './receivedmaterial/receivedmaterial.c
import { AllocatematerialComponent } from './allocatematerial/allocatematerial.component';
import { StudyMaterialComponent } from './study-material/study-material.component';
import { StudymaterialstockComponent } from './studymaterialstock/studymaterialstock.component';
import { ViewstockComponent}from './studymaterialstock/viewstock/viewstock.component';
@NgModule({
imports: [
@ -24,6 +25,6 @@ import { StudymaterialstockComponent } from './studymaterialstock/studymaterials
],
declarations: [ReceivedmaterialComponent, AllocatematerialComponent,
StudyMaterialComponent,
StudymaterialstockComponent]
StudymaterialstockComponent,ViewstockComponent]
})
export class StudymaterialModule { }

View File

@ -77,47 +77,19 @@
</tr>
</thead>
<tbody>
<tr>
<td>Anna University</td>
<td>MCA</td>
<td>1st Sem</td>
<td>10</td>
<td>10</td>
<tr *ngFor="let stock of studymaterialDetails">
<td>{{stock.universityname}}</td>
<td>{{stock.coursename}}</td>
<td>{{stock.semyear}}</td>
<td>{{stock.registration}}</td>
<td>{{stock.stock}}</td>
<td>
<i class="fa fa-eye" tooltip="View More" data-toggle="modal" (click)="myModal.show(); getModelWindowDetails(app)"></i>
<i class="fa fa-eye" tooltip="View More" (click)="viewstock()"></i>
</td>
</tr>
<tr>
<td>Bharathi University</td>
<td>MBA</td>
<td>2nd Sem</td>
<td>15</td>
<td>15</td>
<td>
<i class="fa fa-eye" tooltip="View More" data-toggle="modal" (click)="myModal.show(); getModelWindowDetails(app)"></i>
</td>
</tr>
<tr>
<td>Thiruvalluvar University</td>
<td>BE</td>
<td>3rd Sem</td>
<td>20</td>
<td>20</td>
<td>
<i class="fa fa-eye" tooltip="View More" data-toggle="modal" (click)="myModal.show(); getModelWindowDetails(app)"></i>
</td>
</tr>
<tr>
<td>Kamaraj University</td>
<td>DE</td>
<td>4th sem</td>
<td>34</td>
<td>34</td>
<td>
<i class="fa fa-eye" tooltip="View More" data-toggle="modal" (click)="myModal.show(); getModelWindowDetails(app)"></i>
</td>
</tr>
</tbody>
</table>

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { StudymaterialstockComponent } from './studymaterialstock.component';
describe('StudymaterialstockComponent', () => {
let component: StudymaterialstockComponent;
let fixture: ComponentFixture<StudymaterialstockComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ StudymaterialstockComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(StudymaterialstockComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -6,10 +6,42 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./studymaterialstock.component.scss']
})
export class StudymaterialstockComponent implements OnInit {
show = false;
closed = false;
public myModal;
public myModalData;
studymaterialDetails: any;
constructor() { }
ngOnInit() {
this.studymaterialDetails = [
{
universityname: 'Anna University',
coursename: 'MCA',
semyear: '1st sem/2018',
registration: '30',
stock: '100'
},
{
universityname: 'Bharathi University',
coursename: 'MBA',
semyear: '2nd sem/2018',
registration: '10',
stock: '50'
},
{
universityname: 'Kamaraj University',
coursename: 'ME',
semyear: '3rd sem/2019',
registration: '20',
stock: '80'
}
]
}
getModelWindowDetails(stuCent) {
this.myModalData = stuCent||null;
}
viewstock(){
this.show = !this.show;
}
}

View File

@ -0,0 +1,3 @@
<p>
viewstock works!
</p>

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-viewstock',
templateUrl: './viewstock.component.html',
styleUrls: ['./viewstock.component.scss']
})
export class ViewstockComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}