Compare commits
No commits in common. "btc" and "main" have entirely different histories.
@ -1,14 +0,0 @@
|
|||||||
body {
|
|
||||||
background-image: url('../../../assets/horse.jpg');
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-attachment: fixed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper{
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
@ -1,10 +1,8 @@
|
|||||||
|
<div class="d-flex min-vh-100">
|
||||||
|
<div class="flex-grow-1 d-flex flex-column">
|
||||||
|
|
||||||
<body>
|
<!-- Header Section: BT No, Date/Time, Venue, Race No (matching navbar style) -->
|
||||||
|
<div class="top-bar d-flex justify-content-between align-items-center px-3 py-2" style="background:#0d329f; color:white;">
|
||||||
<div class="d-flex min-vh-100 flex-column">
|
|
||||||
<!-- Header Section (Navbar) -->
|
|
||||||
<div class="top-bar d-flex justify-content-between align-items-center px-3 py-2"
|
|
||||||
style="background:#0d329f; color:white; height: 60px;">
|
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="me-2"><b>B.T.No:1111</b></span>
|
<span class="me-2"><b>B.T.No:1111</b></span>
|
||||||
<span class="date-time">{{ dateTime }}</span>
|
<span class="date-time">{{ dateTime }}</span>
|
||||||
@ -19,27 +17,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Main Content Area (fills rest of screen) -->
|
<!-- Main Content -->
|
||||||
<div class="flex-grow-1 d-flex flex-column wrapper" style="height: calc(100vh - 60px); margin-top: 2.8rem;">
|
<div class="flex-grow-1 p-3">
|
||||||
|
<app-middle-section></app-middle-section>
|
||||||
|
|
||||||
<!-- 70%: Middle Section -->
|
<!-- Tablet View Touchpad -->
|
||||||
<div style="flex: 0 0 56%;">
|
<div *ngIf="isTabletView" class="mt-3">
|
||||||
<app-middle-section [containerHeight]="'100%'"></app-middle-section>
|
<app-touch-pad-menu [ticketingActive]="isTicketingActive"></app-touch-pad-menu>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 30%: Footer -->
|
|
||||||
<div style="flex: 0 0 10%; background-color: #469c7ba2; margin-bottom: 5rem;">
|
|
||||||
<!-- You can insert a component or HTML here -->
|
|
||||||
<div class="h-100 d-flex align-items-center justify-content-center">
|
|
||||||
<h5 class="mb-0">Live data goes here </h5>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
|
|||||||
@ -23,11 +23,10 @@ div[style*="background-color: black"] .custom-cell {
|
|||||||
.middle-section-container {
|
.middle-section-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
|
height: 38vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* height is now controlled dynamically via [ngStyle] */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Desktop view (default) */
|
/* Desktop view (default) */
|
||||||
.main-table {
|
.main-table {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<!-- Responsive Container -->
|
<!-- Responsive Container -->
|
||||||
<div class="middle-section-container" [ngStyle]="{ height: containerHeight }">
|
<div class="middle-section-container">
|
||||||
|
|
||||||
<!-- Transaction Summary -->
|
<!-- Transaction Summary -->
|
||||||
<div class="transaction-summary">
|
<div class="transaction-summary">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -1,32 +1,15 @@
|
|||||||
// import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
// import { CommonModule } from '@angular/common'; // ✅ Import this
|
import { CommonModule } from '@angular/common'; // ✅ Import this
|
||||||
|
|
||||||
// @Component({
|
|
||||||
// selector: 'app-middle-section',
|
|
||||||
// standalone: true,
|
|
||||||
// imports: [CommonModule], // ✅ Add CommonModule here
|
|
||||||
// templateUrl: './middle-section.component.html',
|
|
||||||
// styleUrls: ['./middle-section.component.css']
|
|
||||||
// })
|
|
||||||
// export class MiddleSectionComponent {
|
|
||||||
// rows = Array.from({ length: 5 });
|
|
||||||
// summaryRows = Array.from({ length: 4 }); // 4 empty rows for now
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
import { Component, Input } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-middle-section',
|
selector: 'app-middle-section',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [CommonModule],
|
imports: [CommonModule], // ✅ Add CommonModule here
|
||||||
templateUrl: './middle-section.component.html',
|
templateUrl: './middle-section.component.html',
|
||||||
styleUrls: ['./middle-section.component.css']
|
styleUrls: ['./middle-section.component.css']
|
||||||
})
|
})
|
||||||
export class MiddleSectionComponent {
|
export class MiddleSectionComponent {
|
||||||
@Input() containerHeight: string = '50vh'; // default for home screen
|
|
||||||
|
|
||||||
rows = Array.from({ length: 5 });
|
rows = Array.from({ length: 5 });
|
||||||
summaryRows = Array.from({ length: 4 }); // 4 empty rows for now
|
summaryRows = Array.from({ length: 4 }); // 4 empty rows for now
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
export class ApplicationHttpRouts {
|
export class ApplicationHttpRouts {
|
||||||
private static readonly PROTOCOL: string = 'http';
|
private static readonly PROTOCOL: string = 'http';
|
||||||
private static readonly BACKEND_SERVER: string = '192.168.1.110';
|
private static readonly BACKEND_SERVER: string = '172.20.100.122';
|
||||||
private static readonly FRONT_PORT_NUMBER: string = '4200';
|
private static readonly FRONT_PORT_NUMBER: string = '4200';
|
||||||
private static readonly PORT_NUMBER: string = '8083';
|
private static readonly PORT_NUMBER: string = '8083';
|
||||||
private static readonly SOCKET: string = `${this.PROTOCOL}://${this.BACKEND_SERVER}:${this.PORT_NUMBER}`;
|
private static readonly SOCKET: string = `${this.PROTOCOL}://${this.BACKEND_SERVER}:${this.PORT_NUMBER}`;
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<div class="flex-grow-1 p-3">
|
<div class="flex-grow-1 p-3">
|
||||||
<app-middle-section [containerHeight]="'38vh'"></app-middle-section>
|
<app-middle-section></app-middle-section>
|
||||||
|
|
||||||
<!-- Tablet View Touchpad -->
|
<!-- Tablet View Touchpad -->
|
||||||
<div *ngIf="isTabletView" class="mt-3">
|
<div *ngIf="isTabletView" class="mt-3">
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Scan Enable/Disable Toggle Button -->
|
<!-- Scan Enable/Disable Toggle Button -->
|
||||||
<!-- <button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="scan-toggle-btn"
|
class="scan-toggle-btn"
|
||||||
(click)="toggleScan()"
|
(click)="toggleScan()"
|
||||||
@ -27,7 +27,7 @@
|
|||||||
style="margin-bottom: 10px"
|
style="margin-bottom: 10px"
|
||||||
>
|
>
|
||||||
Scanner: {{ scanningEnabled ? "ON" : "OFF" }}
|
Scanner: {{ scanningEnabled ? "ON" : "OFF" }}
|
||||||
</button> -->
|
</button>
|
||||||
<!-- End Scan Toggle Button -->
|
<!-- End Scan Toggle Button -->
|
||||||
|
|
||||||
<!-- Login Form -->
|
<!-- Login Form -->
|
||||||
|
|||||||
@ -221,19 +221,19 @@ export class LoginComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
// 🖨️ Print logic commented out
|
// 🖨️ Print logic commented out
|
||||||
|
|
||||||
fetch('http://localhost:9100/print', {
|
// fetch('http://localhost:9100/print', {
|
||||||
method: 'POST',
|
// method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
// headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify(printData),
|
// body: JSON.stringify(printData),
|
||||||
})
|
// })
|
||||||
.then((res) => {
|
// .then((res) => {
|
||||||
if (!res.ok) throw new Error('Print failed');
|
// if (!res.ok) throw new Error('Print failed');
|
||||||
console.log('🖨️ Print successful');
|
// console.log('🖨️ Print successful');
|
||||||
})
|
// })
|
||||||
.catch((err) => {
|
// .catch((err) => {
|
||||||
console.error('‼️ Print failed', err);
|
// console.error('‼️ Print failed', err);
|
||||||
this.loginError = 'Login OK, but printing failed.';
|
// this.loginError = 'Login OK, but printing failed.';
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
// ✅ Open secondary screen after login
|
// ✅ Open secondary screen after login
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 558 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 373 KiB |
@ -1,9 +0,0 @@
|
|||||||
package com.example.cezenBTC.DTO.race_card;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public record Pools(Map<String, Set<Integer>> comboRaces) {
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
package com.example.cezenBTC.DTO.race_card;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public record RaceCard(String Venue, LocalDate date, RaceVenueRaces raceVenueRaces, Pools pools) {
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
package com.example.cezenBTC.DTO.race_card;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public record RaceVenueRaces(Set<Set<Integer>> races) {
|
|
||||||
}
|
|
||||||
@ -103,7 +103,6 @@ public class CezenRoutsSecurityChain {
|
|||||||
"/btc/get_all_venues",
|
"/btc/get_all_venues",
|
||||||
"/btc/get_races_by_venue_id",
|
"/btc/get_races_by_venue_id",
|
||||||
"/btc/get_all_races_by_today",
|
"/btc/get_all_races_by_today",
|
||||||
"/btc/get_race_card",
|
|
||||||
"/cezen/set_aors",
|
"/cezen/set_aors",
|
||||||
"/cezen/set_password",
|
"/cezen/set_password",
|
||||||
"/cezen/add_extension"
|
"/cezen/add_extension"
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
package com.example.cezenBTC.controller;
|
package com.example.cezenBTC.controller;
|
||||||
|
|
||||||
import com.example.cezenBTC.DTO.race_card.RaceCard;
|
|
||||||
import com.example.cezenBTC.entity.btc_entity.RaceNumber;
|
import com.example.cezenBTC.entity.btc_entity.RaceNumber;
|
||||||
import com.example.cezenBTC.entity.btc_entity.RaceVenue;
|
import com.example.cezenBTC.entity.btc_entity.RaceVenue;
|
||||||
import com.example.cezenBTC.service.BtcRaceService;
|
import com.example.cezenBTC.service.BtcRaceService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@ -41,10 +39,4 @@ public class BtcOperations {
|
|||||||
|
|
||||||
return this.btcRaceService.getAllRacesByDateService(LocalDate.now());
|
return this.btcRaceService.getAllRacesByDateService(LocalDate.now());
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get_race_card")
|
|
||||||
public ResponseEntity<RaceCard> getRaceCard(){
|
|
||||||
|
|
||||||
return this.btcRaceService.getRaceCard(LocalDate.now());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,17 +2,13 @@ package com.example.cezenBTC.service;
|
|||||||
|
|
||||||
import com.example.cezenBTC.DAO.BtcOpsDAO;
|
import com.example.cezenBTC.DAO.BtcOpsDAO;
|
||||||
import com.example.cezenBTC.DTO.ReturnStatus;
|
import com.example.cezenBTC.DTO.ReturnStatus;
|
||||||
import com.example.cezenBTC.DTO.race_card.Pools;
|
|
||||||
import com.example.cezenBTC.DTO.race_card.RaceCard;
|
|
||||||
import com.example.cezenBTC.DTO.race_card.RaceVenueRaces;
|
|
||||||
import com.example.cezenBTC.entity.btc_entity.RaceNumber;
|
import com.example.cezenBTC.entity.btc_entity.RaceNumber;
|
||||||
import com.example.cezenBTC.entity.btc_entity.RaceVenue;
|
import com.example.cezenBTC.entity.btc_entity.RaceVenue;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class BtcRaceService {
|
public class BtcRaceService {
|
||||||
@ -83,35 +79,4 @@ public class BtcRaceService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResponseEntity<RaceCard> getRaceCard(LocalDate date){
|
|
||||||
|
|
||||||
//create race numbers
|
|
||||||
Set<Integer> races1 = new LinkedHashSet<>(List.of(1,2,3,4,5,6,7,8,10));
|
|
||||||
Set<Integer> races2 = new LinkedHashSet<>(List.of(2,4,6,8,10,12));
|
|
||||||
Set<Integer> races3 = new LinkedHashSet<>(List.of(1,2,3,5,7,8,9,10,11));
|
|
||||||
Set<Integer> races4 = new LinkedHashSet<>(List.of(1,2,3,4,5,6,7,8,10,12,13));
|
|
||||||
|
|
||||||
// create a Venue
|
|
||||||
Set<Set<Integer>> mysRaces = new LinkedHashSet<>();
|
|
||||||
mysRaces.add(races1);
|
|
||||||
mysRaces.add(races2);
|
|
||||||
mysRaces.add(races3);
|
|
||||||
mysRaces.add(races4);
|
|
||||||
RaceVenueRaces raceVenueMYS = new RaceVenueRaces(mysRaces);
|
|
||||||
|
|
||||||
//create a Pool combination
|
|
||||||
Set<Integer> pool1 = new LinkedHashSet<>(List.of(5, 6, 7));
|
|
||||||
Set<Integer> pool2 = new LinkedHashSet<>(List.of(1, 2, 3));
|
|
||||||
|
|
||||||
// pole id to pool combo
|
|
||||||
Map<String, Set<Integer>> mysPools = new LinkedHashMap<>();
|
|
||||||
mysPools.put("TRB2", pool1);
|
|
||||||
mysPools.put("MJP1", pool2);
|
|
||||||
Pools mysPool = new Pools(mysPools);
|
|
||||||
|
|
||||||
RaceCard raceCard = new RaceCard("MYS", date, raceVenueMYS, mysPool);
|
|
||||||
|
|
||||||
return ResponseEntity.status(200).body(raceCard);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user