Commit 9f351b7c by DESKTOP-HF0LVOG\myhr

Revert "Add หน้าต่างดำเนินการ"

This reverts commit 32cfcb9f.
parent 32cfcb9f
...@@ -21,7 +21,6 @@ import { EquipmentComponent } from "./pages/equipment/equipment.component"; ...@@ -21,7 +21,6 @@ import { EquipmentComponent } from "./pages/equipment/equipment.component";
import { CalenRoomComponent } from './pages/calen-room/calen-room.component'; import { CalenRoomComponent } from './pages/calen-room/calen-room.component';
import { AdminPendingComponent } from './pages/admin-pending/admin-pending.component'; import { AdminPendingComponent } from './pages/admin-pending/admin-pending.component';
import { PendingComponent } from './pages/pending/pending.component'; import { PendingComponent } from './pages/pending/pending.component';
import { LendPageComponent } from './pages/lend-page/lend-page.component';
FullCalendarModule.registerPlugins([ // register FullCalendar plugins FullCalendarModule.registerPlugins([ // register FullCalendar plugins
dayGridPlugin, dayGridPlugin,
...@@ -40,7 +39,7 @@ FullCalendarModule.registerPlugins([ // register FullCalendar plugins ...@@ -40,7 +39,7 @@ FullCalendarModule.registerPlugins([ // register FullCalendar plugins
ToastrModule.forRoot(), ToastrModule.forRoot(),
FullCalendarModule, FullCalendarModule,
], ],
declarations: [AppComponent, AdminLayoutComponent, AuthLayoutComponent, HomePageComponent, EquipmentComponent, CalenRoomComponent, AdminPendingComponent, PendingComponent, LendPageComponent], declarations: [AppComponent, AdminLayoutComponent, AuthLayoutComponent, HomePageComponent, EquipmentComponent, CalenRoomComponent, AdminPendingComponent, PendingComponent],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]
}) })
......
...@@ -36,13 +36,6 @@ export const ROUTES: RouteInfo[] = [ ...@@ -36,13 +36,6 @@ export const ROUTES: RouteInfo[] = [
icon: "icon-bag-16", icon: "icon-bag-16",
class: "" class: ""
}, },
{
path: "/lend-page",
title: "หน้าจอดำเนินการ",
rtlTitle: "",
icon: "icon-bag-16",
class: ""
},
]; ];
@Component({ @Component({
......
...@@ -11,7 +11,6 @@ import { HomePageComponent } from "src/app/pages/home-page/home-page.component"; ...@@ -11,7 +11,6 @@ import { HomePageComponent } from "src/app/pages/home-page/home-page.component";
import { EquipmentComponent } from "src/app/pages/equipment/equipment.component"; import { EquipmentComponent } from "src/app/pages/equipment/equipment.component";
import { AdminPendingComponent } from "src/app/pages/admin-pending/admin-pending.component"; import { AdminPendingComponent } from "src/app/pages/admin-pending/admin-pending.component";
import { PendingComponent } from "src/app/pages/pending/pending.component"; import { PendingComponent } from "src/app/pages/pending/pending.component";
import { LendPageComponent } from "src/app/pages/lend-page/lend-page.component";
// import { RtlComponent } from "../../pages/rtl/rtl.component"; // import { RtlComponent } from "../../pages/rtl/rtl.component";
export const AdminLayoutRoutes: Routes = [ export const AdminLayoutRoutes: Routes = [
...@@ -19,7 +18,6 @@ export const AdminLayoutRoutes: Routes = [ ...@@ -19,7 +18,6 @@ export const AdminLayoutRoutes: Routes = [
{ path: "equipment", component: EquipmentComponent }, { path: "equipment", component: EquipmentComponent },
{ path: "admin-pending", component: AdminPendingComponent }, { path: "admin-pending", component: AdminPendingComponent },
{ path: "pending", component: PendingComponent }, { path: "pending", component: PendingComponent },
{ path: "lend-page", component: LendPageComponent },
{ path: "dashboard", component: DashboardComponent }, { path: "dashboard", component: DashboardComponent },
{ path: "icons", component: IconsComponent }, { path: "icons", component: IconsComponent },
{ path: "maps", component: MapComponent }, { path: "maps", component: MapComponent },
......
interface RoomModel {
rid: number;
rname: string;
rdesc: string;
rpic: string;
}
interface EquirmentModel {
id: number;
name: string;
desc: string;
type?: CategoryModel;
pic: string;
}
interface CategoryModel {
id: number;
name: string;
}
interface Country {
id?: number;
catagory: string;
type: string;
detail: string;
name: string;
sdate: string;
edate: string;
status: string;
quantity: string;
}
\ No newline at end of file
interface TransectionRoom{
id: number ;
employeeId : string ;
remark : string ;
room : RoomModel;
}
\ No newline at end of file
<div class="content"> <div class="content">
<div class="row"> <div class="row">
<div class="col-8"> <div class="col-sm-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div> <div>
...@@ -9,24 +9,7 @@ ...@@ -9,24 +9,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-4">
<div class="card">
<div class="card-body">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-sm btn-outline-primary" id="dropdownBasic1"
ngbDropdownToggle>ประเภทการค้นหา</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>ห้อง</button>
<button ngbDropdownItem>รถ</button>
<button ngbDropdownItem>อุปกรณ์สำนักงาน</button>
</div>
<button class="btn btn-sm btn-outline-success" type="submit">Search</button>
</div>
</div>
</div>
</div>
</div> </div>
<ul ngbNav #nav="ngbNav" class="nav-tabs"> <ul ngbNav #nav="ngbNav" class="nav-tabs">
<li ngbNavItem> <li ngbNavItem>
<a ngbNavLink>การจอง</a> <a ngbNavLink>การจอง</a>
...@@ -72,8 +55,8 @@ ...@@ -72,8 +55,8 @@
<div class=" form-group"> <div class=" form-group">
<label> Details </label> <label> Details </label>
<textarea class="form-control" <textarea class="form-control"
id="exampleFormControlTextarea1" rows="3" id="exampleFormControlTextarea1"
placeholder="......"></textarea> rows="3" placeholder="......"></textarea>
</div> </div>
</div> </div>
</div> </div>
...@@ -109,59 +92,6 @@ ...@@ -109,59 +92,6 @@
<div class="text-center"> <div class="text-center">
<div class="d-grid gap-2 a-md-flex justify-content-md-end "> <div class="d-grid gap-2 a-md-flex justify-content-md-end ">
<button class="btn btn-sm btn-primary" type="button">ยืม</button> <button class="btn btn-sm btn-primary" type="button">ยืม</button>
<ng-template #content let-modal style="padding: 0; ">
<div class=" col-md-12">
<div class="card">
<div class=" card-header">
<h5 class=" title">Add Equirment</h5>
</div>
<div class=" card-body">
<form>
<div class=" row">
<div class=" col-md-12">
<div class=" form-group">
<label> Name </label>
<input class=" form-control" placeholder="" type="text"
value="" />
</div>
</div>
</div>
<div class=" row">
<div class=" col-md-6 mb-2">
<div class=" form-group">
<label> Type </label>
<br>
<select class="form-select"
aria-label="Default select example">
<option selected>Open this select type</option>
<option value="1">Rooms</option>
<option value="2">Cars</option>
</select>
</div>
</div>
</div>
<div class=" row">
<div class=" col-md-12">
<div class=" form-group">
<label> Details </label>
<textarea class="form-control"
id="exampleFormControlTextarea1" rows="3"
placeholder="......"></textarea>
</div>
</div>
</div>
<label for="exampleFormControlFile">แนบไฟล์รูปภาพ</label>
<input type="file" class="form-control-file"
id="exampleFormControlFile">
</form>
</div>
<div class=" card-footer">
<button class=" btn btn-fill btn-danger" type="submit">Save</button>
<button class=" btn btn-fill btn-danger" type="cancel">Cancel</button>
</div>
</div>
</div>
</ng-template>
<button class="btn btn-sm btn-primary" type="button">ยกเลิก</button> <button class="btn btn-sm btn-primary" type="button">ยกเลิก</button>
</div> </div>
</div> </div>
...@@ -231,8 +161,8 @@ ...@@ -231,8 +161,8 @@
<div class=" form-group"> <div class=" form-group">
<label> Details </label> <label> Details </label>
<textarea class="form-control" <textarea class="form-control"
id="exampleFormControlTextarea1" rows="3" id="exampleFormControlTextarea1"
placeholder="......"></textarea> rows="3" placeholder="......"></textarea>
</div> </div>
</div> </div>
</div> </div>
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap';
interface EquirmentModel {
id: number;
name: string;
desc: string;
type: string;
pic: string;
}
interface RoomModel{
rid : number;
rname : string;
rdesc : string;
rpic : string;
}
@Component({ @Component({
selector: 'app-equipment', selector: 'app-equipment',
...@@ -20,40 +31,28 @@ export class EquipmentComponent implements OnInit { ...@@ -20,40 +31,28 @@ export class EquipmentComponent implements OnInit {
id: 1, id: 1,
name: "จอคอมพิวเตอร์", name: "จอคอมพิวเตอร์",
desc: "หน้าจอขนาด 22 นิ้ว", desc: "หน้าจอขนาด 22 นิ้ว",
type: { type: "it",
id: 1,
name: "it",
},
pic: "assets/img/mo1.jpg" pic: "assets/img/mo1.jpg"
}, },
{ {
id: 2, id: 2,
name: "เมาส์", name: "เมาส์",
desc: "...", desc: "...",
type: { type: "it",
id: 1,
name: "it",
},
pic: "assets/img/mou.jpg" pic: "assets/img/mou.jpg"
}, },
{ {
id: 3, id: 3,
name: "โน๊ตบุ๊ค", name: "โน๊ตบุ๊ค",
desc: "หน้าจอขนาด 20 นิ้ว", desc: "หน้าจอขนาด 20 นิ้ว",
type: { type: "it",
id: 1,
name: "it",
},
pic: "assets/img/notebook.jpg" pic: "assets/img/notebook.jpg"
}, },
{ {
id: 4, id: 4,
name: "คีย์บอร์ด", name: "คีย์บอร์ด",
desc: "...", desc: "...",
type: { type: "it",
id: 1,
name: "it",
},
pic: "assets/img/keyboard.png" pic: "assets/img/keyboard.png"
} }
] ]
......
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Catagory</th>
<th scope="col">Type</th>
<th scope="col">Detail</th>
<th scope="col">Name</th>
<th scope="col">Start-Date</th>
<th scope="col">End-Date</th>
<th scope="col">Quantity</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let country of countries">
<th scope="row">{{ country.id }}</th>
<td>{{ country.catagory }}</td>
<td>{{ country.type }}</td>
<td>{{ country.detail }}</td>
<td>{{ country.name }}</td>
<td>{{ country.sdate | date:'dd-MM-yyyy' }}</td>
<td>{{ country.edate | date:'dd-MM-yyyy' }}</td>
<td>
<button class="btn btn-primary btn-sm" (click)="_increamentQTY(item.productId._id,1)">+</button>
{{ country.quantity }}
<button class="btn btn-primary btn-sm">-</button>
</td>
</tr>
</tbody>
</table>
<div class="text-center">
<div class="d-grid gap-2 a-md-flex justify-content-md-end ">
<button class="btn btn-sm btn-primary" type="button">ยืม</button>
<button class="btn btn-sm btn-primary" type="button">ยกเลิก</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LendPageComponent } from './lend-page.component';
describe('LendPageComponent', () => {
let component: LendPageComponent;
let fixture: ComponentFixture<LendPageComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ LendPageComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(LendPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-lend-page',
templateUrl: './lend-page.component.html',
styleUrls: ['./lend-page.component.scss']
})
export class LendPageComponent implements OnInit {
countries: Country[] = [
{
catagory: 'string',
type: 'string',
detail: 'Moniter',
name: 'a',
sdate: '2021-11-25',
edate: '2021-11-25',
status: 'waiting',
quantity : '1',
},
{
catagory: 'string',
type: 'string',
detail: 'Mouse',
name: 'b',
sdate: '2021-11-25',
edate: '2021-11-25',
status: 'waiting',
quantity : '1',
}
];
collectionSize = this.countries.length;
constructor() { }
ngOnInit(): void {
}
}
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { NgbDate, NgbCalendar, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap'; import { NgbDate, NgbCalendar, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap';
interface Country {
id?: number;
catagory: string;
type: string;
detail: string;
name: string;
sdate: string;
edate: string;
status: string;
}
@Component({ @Component({
selector: 'app-pending', selector: 'app-pending',
templateUrl: './pending.component.html', templateUrl: './pending.component.html',
...@@ -45,7 +56,6 @@ export class PendingComponent implements OnInit { ...@@ -45,7 +56,6 @@ export class PendingComponent implements OnInit {
sdate: '2021-11-25', sdate: '2021-11-25',
edate: '2021-11-25', edate: '2021-11-25',
status: 'waiting', status: 'waiting',
quantity : '1',
}, },
{ {
catagory: 'string', catagory: 'string',
...@@ -55,7 +65,6 @@ export class PendingComponent implements OnInit { ...@@ -55,7 +65,6 @@ export class PendingComponent implements OnInit {
sdate: '2021-11-25', sdate: '2021-11-25',
edate: '2021-11-25', edate: '2021-11-25',
status: 'waiting', status: 'waiting',
quantity : '1',
} }
]; ];
collectionSize = this.countries.length; collectionSize = this.countries.length;
......
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