Commit 8ec6e95a by pantakan konthang

สร้างเพิ่ม

-portal-create-category

อัพเดท
-portal-category-manage
-portal-template-manage
-portal-category-list-approve
-portal-template-approve
-portal-category-list
-portal-template-list
parent b84aef7e
......@@ -81,6 +81,7 @@ import { PortalCategoryListApproveComponent } from './portal-category-list-appro
import { PortalTemplateApproveComponent } from './portal-template-approve/portal-template-approve.component';
import { PortalCategoryListComponent } from './portal-category-list/portal-category-list.component';
import { PortalTemplateListComponent } from './portal-template-list/portal-template-list.component';
import { PortalCreateCategoryComponent } from './portal-create-category/portal-create-category.component';
@NgModule({
......@@ -139,7 +140,8 @@ import { PortalTemplateListComponent } from './portal-template-list/portal-templ
PortalCategoryListApproveComponent,
PortalTemplateApproveComponent,
PortalCategoryListComponent,
PortalTemplateListComponent
PortalTemplateListComponent,
PortalCreateCategoryComponent
],
providers: [
ContactService,
......
......@@ -36,6 +36,7 @@ import { PortalCategoryListApproveComponent } from "./portal-category-list-appro
import { PortalTemplateApproveComponent } from "./portal-template-approve/portal-template-approve.component";
import { PortalCategoryListComponent } from "./portal-category-list/portal-category-list.component";
import { PortalTemplateListComponent } from "./portal-template-list/portal-template-list.component";
import { PortalCreateCategoryComponent } from "./portal-create-category/portal-create-category.component";
export const AppsRoutes: Routes = [
{
......@@ -219,6 +220,16 @@ export const AppsRoutes: Routes = [
},
},
{
path: "portal-create-category",
component: PortalCreateCategoryComponent,
data: {
title: "Create Category",
urls: [
{ title: "Create Category" },
],
},
},
{
path: "import-template",
component: ListTemplateImportComponent,
data: {
......
......@@ -21,7 +21,7 @@
<br />
</div>
<div class="mt-3">
<a href="/apps/portal-template-approve">
<a (click)="routerLink('/apps/portal-template-approve',c.type)">
<button class="btn btn-info">View</button>
</a>
<!-- <button class="btn btn-warning">Edit</button>
......
......@@ -2,6 +2,7 @@ import { Component, OnInit } from "@angular/core";
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { User } from "../users/user";
import { Router } from "@angular/router";
@Component({
selector: "app-portal-category-list-approve",
......@@ -12,6 +13,7 @@ export class PortalCategoryListApproveComponent implements OnInit {
constructor(
private fb: FormBuilder,
private modalService: NgbModal,
private router:Router
) {}
get searchTerm(): string {
return this._searchTerm;
......@@ -28,6 +30,7 @@ export class PortalCategoryListApproveComponent implements OnInit {
testdata: {
img: String;
name: String;
type: String;
details: String;
document: String;
}[] = [];
......@@ -38,18 +41,21 @@ export class PortalCategoryListApproveComponent implements OnInit {
{
img: "assets/images/phototest/excel.jpg",
name: "ประเภทไฟล์: Excel",
type: "Excel",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 8 ฉบับ"
},
{
img: "assets/images/phototest/mail.jpg",
name: "ประเภทไฟล์: Mail Merge",
type: "Mail Merge",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 3 ฉบับ"
},
{
img: "assets/images/phototest/resume.jpg",
name: "ประเภทไฟล์: Resume",
type: "Resume",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 5 ฉบับ"
},
......@@ -68,4 +74,8 @@ export class PortalCategoryListApproveComponent implements OnInit {
this.ngOnInit();
}
routerLink(path: String, type: String){
this.router.navigate([path,{type:type}])
}
}
......@@ -21,7 +21,7 @@
<br />
</div>
<div class="mt-3">
<a href="/apps/portal-template-list">
<a (click)="routerLink('/apps/portal-template-list',c.type)">
<button class="btn btn-info">View</button>
</a>
<!-- <button class="btn btn-warning">Edit</button>
......
import { Component, OnInit } from '@angular/core';
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { Router } from '@angular/router';
@Component({
selector: 'app-portal-category-list',
......@@ -12,6 +13,7 @@ export class PortalCategoryListComponent implements OnInit {
constructor(
private fb: FormBuilder,
private modalService: NgbModal,
private router:Router
) {}
get searchTerm(): string {
return this._searchTerm;
......@@ -28,6 +30,7 @@ export class PortalCategoryListComponent implements OnInit {
testdata: {
img: String;
name: String;
type: String;
details: String;
document: String;
}[] = [];
......@@ -38,18 +41,21 @@ export class PortalCategoryListComponent implements OnInit {
{
img: "assets/images/phototest/excel.jpg",
name: "ประเภทไฟล์: Excel",
type: "Excel",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 8 ฉบับ"
},
{
img: "assets/images/phototest/mail.jpg",
name: "ประเภทไฟล์: Mail Merge",
type: "Mail Merge",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 3 ฉบับ"
},
{
img: "assets/images/phototest/resume.jpg",
name: "ประเภทไฟล์: Resume",
type: "Resume",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 5 ฉบับ"
},
......@@ -68,4 +74,8 @@ export class PortalCategoryListComponent implements OnInit {
this.ngOnInit();
}
routerLink(path: String, type: String){
this.router.navigate([path,{type:type}])
}
}
......@@ -4,7 +4,7 @@
<h4 class="card-title">Category Manage</h4>
<div class="d-flex mb-3 mt-3">
<input type="text" class="form-control w-25" placeholder="Search" [(ngModel)]='searchTerm'>
<button class="btn btn-primary ml-auto" (click)="openModal(editTemplateModal)">Add File Type Category</button>
<!-- <button class="btn btn-primary ml-auto" (click)="openModal(editTemplateModal)">Add File Type Category</button> -->
</div>
</div>
</div>
......@@ -20,11 +20,11 @@
<br />
</div>
<div class="mt-3">
<a href="/apps/portal-template-manage">
<a (click)="routerLink('/apps/portal-template-manage',c.type)">
<button class="btn btn-info">View</button>
</a>
<button class="btn btn-warning">Edit</button>
<button class="btn btn-danger">Delete</button>
<!-- <button class="btn btn-warning">Edit</button>
<button class="btn btn-danger">Delete</button> -->
<!-- <button class="btn btn-light">Follow</button> -->
</div>
</div>
......
......@@ -2,6 +2,7 @@ import { Component, OnInit } from "@angular/core";
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { DatePipe } from "@angular/common";
import { Router } from "@angular/router";
// export interface Testdata {
// img: String;
......@@ -16,7 +17,7 @@ import { DatePipe } from "@angular/common";
})
export class PortalCategoryManageComponent implements OnInit {
constructor(private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe) {}
constructor(private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe, private router:Router) {}
get searchTerm(): string {
return this._searchTerm;
......@@ -30,6 +31,7 @@ export class PortalCategoryManageComponent implements OnInit {
testdata: {
img: String;
name: String;
type: String;
details: String;
document: String;
}[] = [];
......@@ -84,18 +86,21 @@ export class PortalCategoryManageComponent implements OnInit {
{
img: "assets/images/phototest/excel.jpg",
name: "ประเภทไฟล์: Excel",
type: "Excel",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 8 ฉบับ"
},
{
img: "assets/images/phototest/mail.jpg",
name: "ประเภทไฟล์: Mail Merge",
type: "Mail Merge",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 3 ฉบับ"
},
{
img: "assets/images/phototest/resume.jpg",
name: "ประเภทไฟล์: Resume",
type: "Resume",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 5 ฉบับ"
},
......@@ -131,4 +136,9 @@ export class PortalCategoryManageComponent implements OnInit {
this.modalService.dismissAll();
this.ngOnInit();
}
routerLink(path: String, type: String){
this.router.navigate([path,{type:type}])
}
}
<p>
portal-create-category works!
</p>
<div class="row">
<div class="col-12">
<div class="card card-body">
<h4 class="card-title">Create Category</h4>
<div class="d-flex mb-3 mt-3">
<input type="text" class="form-control w-25" placeholder="Search" [(ngModel)]='searchTerm'>
<button class="btn btn-primary ml-auto" (click)="openModal(editTemplateModal)">Add File Type Category</button>
</div>
</div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-4" *ngFor="let c of testdata|slice: (page-1) * pageSize : (page-1) * pageSize + pageSize">
<div class="card">
<div class="card-body text-center">
<img src="{{ c.img }}" class="rounded-circle border p-1" width="100">
<h3 class="card-title mt-3 mb-0">{{c.name}}</h3>
<div class="mt-1 pt-1">
<h4 class="card-title mt-3 mb-0">{{c.details}}</h4>
<br />
</div>
<div class="mt-3">
<!-- <a href="/portal-template-manage">
<button class="btn btn-info">View</button>
</a> -->
<button class="btn btn-warning">Edit</button>
<button class="btn btn-danger">Delete</button>
<!-- <button class="btn btn-light">Follow</button> -->
</div>
</div>
<div class="d-flex text-center justify-content-md-center bg-light border-top">
<div class="col-4 border-bottom py-3">
<i class="icon-social-instagram m-r-10"></i>
{{ c.document }}
</div>
</div>
</div>
</div>
</div>
<div class="d-flex justify-content-center mt-5">
<ngb-pagination [(page)]="page" [pageSize]="pageSize" [collectionSize]="testdata.length"></ngb-pagination>
</div>
<!-- Add File -->
<ng-template #editTemplateModal let-modal>
<div class="modal-header">
<h5 class="modal-title" id="edittemplateLabel">Add File Type Category</h5>
<button type="button" class="close" (click)="closeBtnClick()" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form [formGroup]="edittemplate" (ngSubmit)="onSubmit()">
<div class="form-group row">
<label for="name" class="col-sm-4 col-form-label">ชื่อประเภทไฟล์</label>
<div class="col-sm-8">
<input type="text" class="form-control" formControlName="Name" id="name" (blur)=logValidationErrors(edittemplate)>
</div>
</div>
<div class="form-group row">
<label for="position" class="col-sm-4 col-form-label">รายละเอียด</label>
<div class="col-sm-8">
<textarea class="form-control"></textarea>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-4 col-form-label">รูปประเภทไฟล์</label>
<div class="col-sm-8">
<input type="file" class="form-control">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="closeBtnClick()">Close</button>
<button type="submit" class="btn btn-primary" >Save</button>
</div>
</form>
</div>
</ng-template>
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { PortalCreateCategoryComponent } from './portal-create-category.component';
describe('PortalCreateCategoryComponent', () => {
let component: PortalCreateCategoryComponent;
let fixture: ComponentFixture<PortalCreateCategoryComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PortalCreateCategoryComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PortalCreateCategoryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { DatePipe } from "@angular/common";
@Component({
selector: 'app-portal-create-category',
templateUrl: './portal-create-category.component.html',
styleUrls: ['./portal-create-category.component.scss']
})
export class PortalCreateCategoryComponent implements OnInit {
constructor(private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe) {}
get searchTerm(): string {
return this._searchTerm;
}
set searchTerm(val: string) {
this._searchTerm = val;
}
page = 1;
pageSize = 9;
testdata: {
img: String;
name: String;
details: String;
document: String;
}[] = [];
// config: any;
// editUser: FormGroup | null = null;
// joiningDate: string | null = null;
_searchTerm = "";
// ValidationMessage = [
// {
// Name: { required: "Name is required." },
// },
// {
// Position: { required: "Position is required." },
// },
// {
// Email: { required: "Email is required." },
// },
// {
// Mobile: { required: "Mobile is required." },
// },
// {
// DateOfJoining: { required: "DOJ is required." },
// },
// {
// Salary: { required: "Salary is required." },
// },
// {
// Projects: { required: "Project is required." },
// },
// ];
formsErrors = [];
ngOnInit() {
// this.editUser = this.fb.group({
// id: [""],
// Name: ["", Validators.required],
// Position: ["", Validators.required],
// Email: ["", Validators.required],
// Mobile: ["", Validators.required],
// DateOfJoining: ["", Validators.required],
// Salary: ["", Validators.required],
// Projects: ["", Validators.required],
// });
this.testdata = [
{
img: "assets/images/phototest/excel.jpg",
name: "ประเภทไฟล์: Excel",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 8 ฉบับ"
},
{
img: "assets/images/phototest/mail.jpg",
name: "ประเภทไฟล์: Mail Merge",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 3 ฉบับ"
},
{
img: "assets/images/phototest/resume.jpg",
name: "ประเภทไฟล์: Resume",
details: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
document: "จำนวนเอกสาร 5 ฉบับ"
},
];
}
logValidationErrors(group: FormGroup) {
// Object.keys(group.controls).forEach((key: string) => {
// const ac = group.get(key);
// this.formsErrors[key] = '';
// if (ac && !ac.valid && (ac.touched || ac.dirty)) {
// const message = this.ValidationMessage[key];
// for (const errorKey in ac.errors) {
// if (errorKey) {
// this.formsErrors[key] += message[errorKey] + ' ';
// }
// }
// }
// if (ac instanceof FormGroup) {
// this.logValidationErrors(ac)
// }
// })
}
openModal(targetModal: NgbModal) {
this.modalService.open(targetModal, {
centered: true,
backdrop: "static",
});
}
closeBtnClick() {
this.modalService.dismissAll();
this.ngOnInit();
}
}
......@@ -18,6 +18,7 @@
<th scope="col">Status</th>
<th scope="col">Type</th>
<th scope="col">File</th>
<th scope="col">Example</th>
<th scope="col">Action</th>
</tr>
</thead>
......@@ -42,9 +43,15 @@
<td>{{ template.DateOfJoining |date :'fullDate' }}</td>
<td>{{ template.Mobile }}</td>
<td>{{ template.Salary }}</td>
<td>{{ typeStatus }}</td>
<td><a style="color: blue;">{{ template.imagePath }}</a></td>
<td>
<a href="javascript: void(0);" (click)="openModal(examplePhotoFile)" class="link mr-2"
ngbTooltip="Example">
<i-feather name="image" class="feather-sm" ></i-feather>
</a>
</td>
<td>
<!-- <a href="javascript: void(0);" (click)="openModal(editTemplateModal, template)" class="link mr-2"
placement="top" ngbTooltip="Edit">
<i-feather name="edit-2" class="feather-sm"></i-feather>
......@@ -129,3 +136,10 @@
</div>
</ng-template>
<ng-template #examplePhotoFile let-modol>
<img src="assets\images\phototest\excel.jpg" alt="">
<div class="row col-12 justify-content-end ml-0 pr-0">
<button type="button" class="btn btn-danger" (click)="closeBtnClick()" aria-label="Close">close</button>
</div>
</ng-template>
......@@ -4,6 +4,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { UserService } from '../users/userService.service';
import { User } from '../users/user';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-portal-template-approve',
......@@ -16,8 +17,10 @@ export class PortalTemplateApproveComponent implements OnInit {
// ngOnInit() {
// }
constructor(private userService: UserService, private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe) {
constructor(private userService: UserService, private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe, private route: ActivatedRoute) {
this.filterArray = this.templateList;
this.typeStatus = this.route.snapshot.paramMap.get('type')!
console.log(this.route.snapshot.paramMap.get('type'));
}
get searchTerm(): string {
return this._searchTerm;
......@@ -29,6 +32,7 @@ export class PortalTemplateApproveComponent implements OnInit {
page = 1;
pageSize = 7;
typeStatus = ""
templateList: User[] = this.userService.getUser();
config: any;
......
......@@ -17,6 +17,7 @@
<th scope="col">Status</th>
<th scope="col">Type</th>
<th scope="col">File</th>
<th scope="col">Example</th>
<th scope="col">Action</th>
</tr>
</thead>
......@@ -41,8 +42,17 @@
<td>{{ template.DateOfJoining |date :'fullDate' }}</td>
<td>{{ template.Mobile }}</td>
<td>{{ template.Salary }}</td>
<td>{{ typeStatus }}</td>
<td><a style="color: blue;">{{ template.imagePath }}</a></td>
<td>
<a href="javascript: void(0);" (click)="openModal(examplePhotoFile)" class="link mr-2"
ngbTooltip="Example">
<i-feather name="image" class="feather-sm" ></i-feather>
</a>
</td>
<td>
<!-- <a href="javascript: void(0);" (click)="openModal(editTemplateModal, template)" class="link mr-2"
placement="top" ngbTooltip="Edit">
......@@ -127,4 +137,11 @@
</div>
</ng-template>
<ng-template #examplePhotoFile let-modol>
<img src="assets\images\phototest\excel.jpg" alt="">
<div class="row col-12 justify-content-end ml-0 pr-0">
<button type="button" class="btn btn-danger" (click)="closeBtnClick()" aria-label="Close">close</button>
</div>
</ng-template>
......@@ -4,6 +4,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { UserService } from '../users/userService.service';
import { User } from '../users/user';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-portal-template-list',
......@@ -12,8 +13,10 @@ import { User } from '../users/user';
})
export class PortalTemplateListComponent implements OnInit {
constructor(private userService: UserService, private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe) {
constructor(private userService: UserService, private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe, private route: ActivatedRoute) {
this.filterArray = this.templateList;
this.typeStatus = this.route.snapshot.paramMap.get('type')!
console.log(this.route.snapshot.paramMap.get('type'));
}
get searchTerm(): string {
return this._searchTerm;
......@@ -25,6 +28,7 @@ export class PortalTemplateListComponent implements OnInit {
page = 1;
pageSize = 7;
typeStatus = "";
templateList: User[] = this.userService.getUser();
config: any;
......
......@@ -18,6 +18,7 @@
<th scope="col">Status</th>
<th scope="col">Type</th>
<th scope="col">File</th>
<th scope="col">Example</th>
<th scope="col">Action</th>
</tr>
</thead>
......@@ -42,9 +43,15 @@
<td>{{ template.DateOfJoining |date :'fullDate' }}</td>
<td>{{ template.Mobile }}</td>
<td>{{ template.Salary }}</td>
<td>{{ typeStatus }}</td>
<td><a style="color: blue;">{{ template.imagePath }}</a></td>
<td>
<a href="javascript: void(0);" (click)="openModal(examplePhotoFile)" class="link mr-2"
ngbTooltip="Example">
<i-feather name="image" class="feather-sm" ></i-feather>
</a>
</td>
<td>
<a href="javascript: void(0);" (click)="openModal(editTemplateModal, template)" class="link mr-2"
placement="top" ngbTooltip="Edit">
<i-feather name="edit-2" class="feather-sm"></i-feather>
......@@ -106,6 +113,13 @@
<textarea class="form-control"></textarea>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-4 col-form-label">รูปตัวอย่างไฟล์</label>
<div class="col-sm-8">
<input type="file" class="form-control">
</div>
</div>
<!-- <div class="form-group row">
<label for="position" class="col-sm-4 col-form-label">ประเภท</label>
......@@ -182,19 +196,22 @@
</span>
</div>
</div> -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="closeBtnClick()">Close</button>
<button type="submit" class="btn btn-primary" [disabled]="edittemplate.invalid">Save</button>
</div>
</form>
</div>
</ng-template>
<ng-template #examplePhotoFile let-modol>
<img src="assets\images\phototest\excel.jpg" alt="">
<div class="row col-12 justify-content-end ml-0 pr-0">
<button type="button" class="btn btn-danger" (click)="closeBtnClick()" aria-label="Close">close</button>
</div>
</ng-template>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { UserService } from '../users/userService.service';
import { User } from '../users/user';
import { ActivatedRoute } from '@angular/router';
@Component({
......@@ -13,11 +14,14 @@ import { User } from '../users/user';
})
export class PortalTemplateManageComponent implements OnInit {
// constructor() { }
// ngOnInit() {
// }
constructor(private userService: UserService, private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe) {
constructor(private userService: UserService, private fb: FormBuilder, private modalService: NgbModal, private datePipe: DatePipe, private route: ActivatedRoute) {
this.filterArray = this.templateList;
this.typeStatus = this.route.snapshot.paramMap.get('type')!
console.log(this.route.snapshot.paramMap.get('type'));
}
get searchTerm(): string {
return this._searchTerm;
......@@ -29,6 +33,7 @@ export class PortalTemplateManageComponent implements OnInit {
page = 1;
pageSize = 7;
typeStatus = ""
templateList: User[] = this.userService.getUser();
config: any;
......@@ -112,10 +117,6 @@ export class PortalTemplateManageComponent implements OnInit {
// })
}
openModal(targetModal: NgbModal, user: User | null) {
this.modalService.open(targetModal, {
centered: true,
......
......@@ -27,7 +27,7 @@ export const ROUTES: RouteInfo[] = [
class: '',
label: "",
labelClass: "",
extralink: false,
extralink: true,
submenu: []
},
{
......@@ -47,7 +47,7 @@ export const ROUTES: RouteInfo[] = [
class: '',
label: "",
labelClass: "",
extralink: false,
extralink: true,
submenu: []
},
{
......@@ -67,13 +67,23 @@ export const ROUTES: RouteInfo[] = [
class: '',
label: "",
labelClass: "",
extralink: false,
extralink: true,
submenu: []
},
]
},
{
path: '/apps/portal-create-category',
title: 'Create Category',
icon: 'mdi mdi-adjust',
class: '',
label: "",
labelClass: "",
extralink: false,
submenu: []
},
{
path: '/apps/import-template',
title: 'Import Template',
icon: 'mdi mdi-adjust',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment