Skip to content

Commit

Permalink
Final Testing 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Naveen-Golla-189 committed Apr 23, 2024
1 parent b8b79e5 commit e1b0688
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 13 deletions.
Binary file modified src/assets/icons/refresh_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions src/buyer/bit-list/bit-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@
</div>

<div class="p-10" id="gridSection">
<div class="w-full ">
<div class="float-right bg-white p-4 rounded-md my-3 cursor-pointer" (click)="reloadData()"><img src="../../assets/icons/refresh_icon.png" width="20px" class="mx-2 inline white" /> Reload
</div>
</div>
<div>
<table mat-table [dataSource]="dataSource">

<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> Name </th>
<td mat-cell *matCellDef="let element"> <span class="text-black cursor-pointer hover:underline hover:font-medium" (click)="eventClicked(element)" [routerLink]="['../createauction']" [queryParams]="{ eventId: element.id }" skipLocationChange>{{element.name}}</span></td>
<td mat-cell *matCellDef="let element"> <span
class="text-black cursor-pointer hover:underline hover:font-medium"
(click)="eventClicked(element)" [routerLink]="['../createauction']"
[queryParams]="{ eventId: element.id }" skipLocationChange>{{element.name}}</span></td>
</ng-container>

<ng-container matColumnDef="displayStatusCode">
Expand All @@ -37,8 +44,9 @@

<ng-container matColumnDef="action">
<th mat-header-cell *matHeaderCellDef> </th>
<td mat-cell *matCellDef="let element"><mat-icon (click)="navClicked(element)" class="cursor-pointer" aria-hidden="false"
aria-label="edit" fontIcon="open_in_new"></mat-icon></td>
<td mat-cell *matCellDef="let element"><mat-icon (click)="navClicked(element)"
class="cursor-pointer" aria-hidden="false" aria-label="edit"
fontIcon="open_in_new"></mat-icon></td>
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
Expand Down
14 changes: 11 additions & 3 deletions src/buyer/bit-list/bit-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,15 @@ export class BitListComponent implements OnInit {
}

ngOnInit(): void {

this.getData();
}

getData(){
this.spinnerService.show();
this.eventService.getAllEvents().subscribe((events: any) => {

if (events && events.length > 0) {
this.auctions = [];
events.forEach((event: any) => {
var event_: Auction = {
name: event.name,
Expand All @@ -54,15 +59,18 @@ export class BitListComponent implements OnInit {
}
this.dataSource.data = this.auctions;
this.spinnerService.hide();
})

});
}

eventClicked(auction: Auction) {
//window.open(`${window.location.origin}/auction/${auction.id}`, "_blank")
console.log(auction)
}

reloadData() {
this.getData();
}

navClicked(auction: Auction) {
window.open(`${window.location.origin}/auction/${auction.id}`, "_blank")
console.log(auction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { last } from 'lodash';
})
export class AuctionChartComponent implements OnInit {
@Input("config") config:any;
chart: any = []
chart: Chart | undefined = undefined;
constructor() {

}
Expand Down
2 changes: 1 addition & 1 deletion src/buyer/buyer-live/buyer-live.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="flex-col p-2 border-[1px] border-slate-200 flex pr-10">
<span class="text-xs">Status</span>
<span
class="text-lg bg-green-700 text-white font-medium px-2 rounded-lg">{{auctionHeaderInfo.displayStatus}}</span>
class="text-lg {{auctionHeaderInfo.statusCode == 5 ? 'bg-slate-600' : 'bg-green-700'}} text-white font-medium px-2 rounded-lg">{{auctionHeaderInfo.displayStatus}}</span>
</div>
<div class="flex flex-col p-2 border-[1px] border-slate-200 flex-grow">
<span class="text-xs">Remaining Time</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

<div class="p-10" id="gridSection">
<div>
<div class="w-full ">
<div class="float-right bg-white p-4 rounded-md my-3 cursor-pointer" (click)="reloadData()"><img src="../../assets/icons/refresh_icon.png" width="20px" class="mx-2 inline white" /> Reload
</div>
</div>
<table mat-table [dataSource]="dataSource">

<ng-container matColumnDef="name">
Expand Down
12 changes: 10 additions & 2 deletions src/supplier/supplier-auctions/supplier-auction.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ export class SupplierAuctionComponent {
}

ngOnInit(): void {

this.getData();
}

getData() {
this.spinnerService.show();
this.supplierService.getInvitedEvents().subscribe((events: any) => {

if (events && events.length > 0) {
this.auctions = [];
events.forEach((event: any) => {
var event_: SupplierAuction = {
name: event.name,
Expand All @@ -61,7 +66,6 @@ export class SupplierAuctionComponent {
this.masterAuctions = this.auctions;
this.spinnerService.hide();
})

}

accepted(auction: any) {
Expand Down Expand Up @@ -95,4 +99,8 @@ export class SupplierAuctionComponent {
var targetUrl = window.location.origin + `/auction/${auction.id}`
window.open(targetUrl, "_blank");
}

reloadData() {
this.getData();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<div class="flex-col p-2 border-[1px] border-slate-200 flex pr-10">
<span class="text-xs">Status</span>
<span class="text-lg bg-green-700 text-white font-medium px-2 rounded-lg">{{config.displayStatus}}</span>
<span class="text-lg {{config.statusCode == 5 ? 'bg-slate-600' : 'bg-green-700'}} text-white font-medium px-2 rounded-lg">{{config.displayStatus}}</span>
</div>
<div class="flex flex-col p-2 border-[1px] border-slate-200 flex-grow">
<span class="text-xs">Best Bid</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class BidHeaderComponent implements OnInit {
this.enableChatNotification = true;
message["isSent"] = false;
this.activeMessagePanel.chats.push(message);
this.toastr.show(message.text, message.sentBy + " sent a message");
this.toastr.show(message.text, "ProcureHub Admin sent a message");
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/supplier/supplier-live/supplier-live.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<div class="flex justify-end bg-white rounded-sm p-5">
<button class="bg-white text-primary p-2 rounded-lg w-[200px] shadow-md hover:shadow-2xl mr-5">{{'Back to Auctions'}}</button>
<button class="bg-primary text-white p-2 rounded-lg w-[200px] shadow-md hover:shadow-2xl mr-5" (click)="placeBid()">{{'Place Bid'}}</button>
<button class="{{auctionHeaderInfo.statusCode == 5 ? 'bg-slate-400 text-black pointer-events-none' : 'bg-primary text-white cursor-pointer'}} p-2 rounded-lg w-[200px] shadow-md hover:shadow-2xl mr-5" (click)="placeBid()">{{'Place Bid'}}</button>
</div>
</div>
</div>
Expand Down

0 comments on commit e1b0688

Please sign in to comment.