Commit 37fd070b by Chanachai

Edit ภาษาและaddปุ่มค้นหา

parent 51383543
......@@ -75,13 +75,13 @@
<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">Status</th>
<th scope="col">หมวดหมู่</th>
<th scope="col">ประเภท</th>
<th scope="col">รายละเอียด</th>
<th scope="col">ชื่อ</th>
<th scope="col">วันที่เริ่มต้น</th>
<th scope="col">วันที่สิ้นสุด</th>
<th scope="col">สถานะ</th>
</tr>
</thead>
<tbody>
......@@ -134,14 +134,14 @@
<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>
<th scope="col">Status</th>
<th scope="col">หมวดหมู่</th>
<th scope="col">ประเภท</th>
<th scope="col">รายละเอียด</th>
<th scope="col">ชื่อ</th>
<th scope="col">วันที่เริ่มต้น</th>
<th scope="col">วันที่สิ้นสุด</th>
<th scope="col">จำนวน</th>
<th scope="col">สถานะ</th>
</tr>
</thead>
<tbody>
......
......@@ -7,13 +7,13 @@
<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>
<th scope="col">หมวดหมู่</th>
<th scope="col">ประเภท</th>
<th scope="col">รายละเอียด</th>
<th scope="col">ชื่อ</th>
<th scope="col">วันที่เริ่มต้น</th>
<th scope="col">วันที่สิ้นสุด</th>
<th scope="col">จำนวน</th>
</tr>
</thead>
<tbody>
......@@ -26,7 +26,8 @@
<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>
<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>
......
import { Component, OnInit } from '@angular/core';
import { NgbDate, NgbCalendar, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap';
import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'app-pending',
......@@ -36,6 +37,8 @@ export class PendingComponent implements OnInit {
page = 1;
pageSize = 10;
closeResult = '';
countries: Country[] = [
{
catagory: 'string',
......@@ -68,7 +71,7 @@ export class PendingComponent implements OnInit {
fromDate: NgbDate | null;
toDate: NgbDate | null;
constructor(private calendar: NgbCalendar, public formatter: NgbDateParserFormatter) {
constructor(private calendar: NgbCalendar, public formatter: NgbDateParserFormatter , private modalService: NgbModal) {
this.fromDate = calendar.getToday();
this.toDate = calendar.getNext(calendar.getToday(), 'd', 10);
this.refreshCountries();
......@@ -91,6 +94,24 @@ export class PendingComponent implements OnInit {
}
}
open(content) {
this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
this.closeResult = `Closed with: ${result}`;
}, (reason) => {
this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
});
}
private getDismissReason(reason: any): string {
if (reason === ModalDismissReasons.ESC) {
return 'by pressing ESC';
} else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
return 'by clicking on a backdrop';
} else {
return `with: ${reason}`;
}
}
isHovered(date: NgbDate) {
return this.fromDate && !this.toDate && this.hoveredDate && date.after(this.fromDate) && date.before(this.hoveredDate);
}
......
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