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";
import { CalenRoomComponent } from './pages/calen-room/calen-room.component';
import { AdminPendingComponent } from './pages/admin-pending/admin-pending.component';
import { PendingComponent } from './pages/pending/pending.component';
import { LendPageComponent } from './pages/lend-page/lend-page.component';
FullCalendarModule.registerPlugins([ // register FullCalendar plugins
dayGridPlugin,
......@@ -40,7 +39,7 @@ FullCalendarModule.registerPlugins([ // register FullCalendar plugins
ToastrModule.forRoot(),
FullCalendarModule,
],
declarations: [AppComponent, AdminLayoutComponent, AuthLayoutComponent, HomePageComponent, EquipmentComponent, CalenRoomComponent, AdminPendingComponent, PendingComponent, LendPageComponent],
declarations: [AppComponent, AdminLayoutComponent, AuthLayoutComponent, HomePageComponent, EquipmentComponent, CalenRoomComponent, AdminPendingComponent, PendingComponent],
providers: [],
bootstrap: [AppComponent]
})
......
......@@ -36,13 +36,6 @@ export const ROUTES: RouteInfo[] = [
icon: "icon-bag-16",
class: ""
},
{
path: "/lend-page",
title: "หน้าจอดำเนินการ",
rtlTitle: "",
icon: "icon-bag-16",
class: ""
},
];
@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 { AdminPendingComponent } from "src/app/pages/admin-pending/admin-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";
export const AdminLayoutRoutes: Routes = [
......@@ -19,7 +18,6 @@ export const AdminLayoutRoutes: Routes = [
{ path: "equipment", component: EquipmentComponent },
{ path: "admin-pending", component: AdminPendingComponent },
{ path: "pending", component: PendingComponent },
{ path: "lend-page", component: LendPageComponent },
{ path: "dashboard", component: DashboardComponent },
{ path: "icons", component: IconsComponent },
{ 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="row">
<div class="col-8">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div>
......@@ -9,24 +9,7 @@
</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>
<ul ngbNav #nav="ngbNav" class="nav-tabs">
<li ngbNavItem>
<a ngbNavLink>การจอง</a>
......@@ -72,8 +55,8 @@
<div class=" form-group">
<label> Details </label>
<textarea class="form-control"
id="exampleFormControlTextarea1" rows="3"
placeholder="......"></textarea>
id="exampleFormControlTextarea1"
rows="3" placeholder="......"></textarea>
</div>
</div>
</div>
......@@ -109,59 +92,6 @@
<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>
<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>
</div>
</div>
......@@ -231,8 +161,8 @@
<div class=" form-group">
<label> Details </label>
<textarea class="form-control"
id="exampleFormControlTextarea1" rows="3"
placeholder="......"></textarea>
id="exampleFormControlTextarea1"
rows="3" placeholder="......"></textarea>
</div>
</div>
</div>
......
import { Component, OnInit } from '@angular/core';
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({
selector: 'app-equipment',
......@@ -20,44 +31,32 @@ export class EquipmentComponent implements OnInit {
id: 1,
name: "จอคอมพิวเตอร์",
desc: "หน้าจอขนาด 22 นิ้ว",
type: {
id: 1,
name: "it",
},
type: "it",
pic: "assets/img/mo1.jpg"
},
{
id: 2,
name: "เมาส์",
desc: "...",
type: {
id: 1,
name: "it",
},
type: "it",
pic: "assets/img/mou.jpg"
},
{
id: 3,
name: "โน๊ตบุ๊ค",
desc: "หน้าจอขนาด 20 นิ้ว",
type: {
id: 1,
name: "it",
},
type: "it",
pic: "assets/img/notebook.jpg"
},
{
id: 4,
name: "คีย์บอร์ด",
desc: "...",
type: {
id: 1,
name: "it",
},
type: "it",
pic: "assets/img/keyboard.png"
}
]
listRoomModel: RoomModel[] = [
{
rid: 1,
......
<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 { 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({
selector: 'app-pending',
templateUrl: './pending.component.html',
......@@ -45,7 +56,6 @@ export class PendingComponent implements OnInit {
sdate: '2021-11-25',
edate: '2021-11-25',
status: 'waiting',
quantity : '1',
},
{
catagory: 'string',
......@@ -55,7 +65,6 @@ export class PendingComponent implements OnInit {
sdate: '2021-11-25',
edate: '2021-11-25',
status: 'waiting',
quantity : '1',
}
];
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