-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
279 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://127.0.0.1:4200", | ||
"webRoot": "/workspaces/DBMS-Car-Service-Center/service-center-app" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# AUTOR - Auto Repair and Service Management System | ||
|
||
CSC540 Fall 2022 - DBMS [Team 15] | ||
|
||
1. Deep Mehta - dmmehta2 | ||
2. Rohan Shiveshwarkar - rsshives | ||
3. Yash Sonar - ysonar | ||
4. Kunal Patil - kpatil5 | ||
|
||
This is a Java 11 Spring Boot API and Angular 14 APP Project | ||
|
||
To cofigure this in local, ensure you have JDK 11 installed on your machine. Then update the following values in application.properties (src > main > resources) file: | ||
|
||
1. spring.datasource.username={NCSU Unity ID} | ||
2. spring.datasource.password={NCSU Oracle DB Password} | ||
3. ssh.password={NCSU Unity ID Password} | ||
|
||
Run the spring boot application and you will be able to see all the APIs listed in the form of Swagger UI. This utilizes JDBC to run SQL queries and retrieve results. This is connected with NCSU Oracle DB. | ||
|
||
These APIs are then consumed by the Angular App which is present in the folder: `service-center-app`, which can be run by ng serve. Update the api url in environment.ts and environment.prod.ts file. | ||
|
||
The GitHub Repository is hosted here: https://github.com/deep-mm/DBMS-Car-Service-Center [*Currently this is private, will be made public past submission deadline.] | ||
|
||
Application URL: https://yoururl.tech/svc [*It might take 2 minutes to load up if the application has been idle for a long time. Refresh it after 5 minutes if it still doesn't load.] | ||
|
||
API URL: https://service-center-api.azurewebsites.net |
166 changes: 87 additions & 79 deletions
166
service-center-app/src/app/add-schedule/add-schedule.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,92 @@ | ||
<ngx-loading [show]="loading" [config]="{fullScreenBackdrop: true}"></ngx-loading> | ||
<div style="margin: 20px;"> | ||
<h2><strong>Create new service schedule</strong></h2> | ||
<h2><strong>Create new service schedule</strong></h2> | ||
|
||
<h3><strong>Cart</strong></h3> | ||
<table class="styled-table"> | ||
<thead class="thead-light"> | ||
<tr class="header" style="background-color: #ffffff;"> | ||
<th scope="col">Service ID</th> | ||
<th scope="col">Service Name</th> | ||
<th scope="col">Service Time (hrs)</th> | ||
<th scope="col">Service Price ($)</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let service of cartService" class="table-row-item"> | ||
<td>{{service.id}}</td> | ||
<td>{{service.service_NAME}}</td> | ||
<td>{{getServiceTime(service)}}</td> | ||
<td>{{getServicePrice(service)}}</td> | ||
</tr> | ||
<tr> | ||
<td><strong>Total</strong></td> | ||
<td></td> | ||
<td><strong>{{getTotalTime()}}</strong></td> | ||
<td><strong>{{getTotalPrice()}}</strong></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<div> | ||
<mat-label>Preferred Date</mat-label><br> | ||
<mat-form-field appearance="outline"> | ||
<input matInput #PreferredDate="ngModel" [(ngModel)]="preferredDate" name="PreferredDate" required min="{{date | date:'yyyy-MM-dd'}}" | ||
type="date" [class.is-invalid]="PreferredDate.invalid && (PreferredDate.touched || PreferredDate.dirty)"> | ||
<mat-error *ngIf="PreferredDate.invalid && (PreferredDate.touched || PreferredDate.dirty)"> | ||
Enter a valid date | ||
</mat-error> | ||
</mat-form-field> | ||
</div> | ||
<div> | ||
<mat-label>Preferred Start Time</mat-label><br> | ||
<mat-form-field appearance="outline"> | ||
<select matNativeControl [(ngModel)]="preferredTime" name="time"> | ||
<option value="" selected></option> | ||
<option *ngFor="let t of time" [value]="t"> | ||
{{t + ":00"}} | ||
</option> | ||
</select> | ||
</mat-form-field> | ||
</div> | ||
<br> | ||
<button mat-raised-button (click)="checkout()" *ngIf="cartService.length>0">Checkout</button> | ||
<h3><strong>Cart</strong></h3> | ||
<table class="styled-table"> | ||
<thead class="thead-light"> | ||
<tr class="header" style="background-color: #ffffff;"> | ||
<th scope="col">Service ID</th> | ||
<th scope="col">Service Name</th> | ||
<th scope="col">Service Time (hrs)</th> | ||
<th scope="col">Service Price ($)</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let service of cartService" class="table-row-item"> | ||
<td>{{service.id}}</td> | ||
<td>{{service.service_NAME}}</td> | ||
<td>{{getServiceTime(service)}}</td> | ||
<td>{{getServicePrice(service)}}</td> | ||
</tr> | ||
<tr> | ||
<td><strong>Total</strong></td> | ||
<td></td> | ||
<td><strong>{{getTotalTime()}}</strong></td> | ||
<td><strong>{{getTotalPrice()}}</strong></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<div> | ||
<mat-label>Preferred Date</mat-label><br> | ||
<mat-form-field appearance="fill"> | ||
<input matInput [matDatepickerFilter]="myFilter" [matDatepicker]="picker" #PreferredDate="ngModel" | ||
[(ngModel)]="preferredDate" name="PreferredDate" required | ||
[class.is-invalid]="PreferredDate.invalid && (PreferredDate.touched || PreferredDate.dirty)" | ||
(ngModelChange)="CheckDate()"> | ||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-datepicker #picker></mat-datepicker> | ||
<mat-error *ngIf="PreferredDate.invalid && (PreferredDate.touched || PreferredDate.dirty)"> | ||
Enter a valid date | ||
</mat-error> | ||
</mat-form-field> | ||
|
||
<br><br> | ||
<h3><strong>Repair Services</strong></h3> | ||
<table class="styled-table"> | ||
<thead class="thead-light"> | ||
<tr class="header" style="background-color: #ffffff;"> | ||
<th scope="col">Service ID</th> | ||
<th scope="col">Service Name</th> | ||
<th scope="col">Service Time (hrs)</th> | ||
<th scope="col">Service Price ($)</th> | ||
<th scope="col">Add to cart</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let service of onlyRepairServices" class="table-row-item"> | ||
<td>{{service.id}}</td> | ||
<td>{{service.service_NAME}}</td> | ||
<td>{{getServiceTime(service)}}</td> | ||
<td>{{getServicePrice(service)}}</td> | ||
<td> | ||
<button mat-raised-button (click)="addToCart(service)" *ngIf="!isServiceInCart(service)" [disabled]="getServiceTime(service) > remainingTime">Add to cart</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div> | ||
<mat-label>Preferred Start Time</mat-label><br> | ||
<mat-form-field appearance="outline"> | ||
<select matNativeControl [(ngModel)]="preferredTime" name="time"> | ||
<option value="" selected></option> | ||
<option *ngFor="let t of time" [value]="t"> | ||
{{t + ":00"}} | ||
</option> | ||
</select> | ||
</mat-form-field> | ||
</div> | ||
<br> | ||
<button mat-raised-button (click)="checkout()" *ngIf="cartService.length>0">Checkout</button> | ||
|
||
<div style="margin-bottom: 50px;"> | ||
<h3><strong>Maintenance Service</strong></h3> | ||
<h4>Your next scheduled maintenance is: <strong>Schedule {{this.nextScheduledService}}</strong> <button mat-raised-button (click)="addMaintenanceServicesToCart()" *ngIf="!maintenanceServiceAdded" style="margin-left: 10px;">Add to cart</button></h4> | ||
</div> | ||
<br><br> | ||
</div> | ||
<br><br> | ||
<h3><strong>Repair Services</strong></h3> | ||
<table class="styled-table"> | ||
<thead class="thead-light"> | ||
<tr class="header" style="background-color: #ffffff;"> | ||
<th scope="col">Service ID</th> | ||
<th scope="col">Service Name</th> | ||
<th scope="col">Service Time (hrs)</th> | ||
<th scope="col">Service Price ($)</th> | ||
<th scope="col">Add to cart</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let service of onlyRepairServices" class="table-row-item"> | ||
<td>{{service.id}}</td> | ||
<td>{{service.service_NAME}}</td> | ||
<td>{{getServiceTime(service)}}</td> | ||
<td>{{getServicePrice(service)}}</td> | ||
<td> | ||
<button mat-raised-button (click)="addToCart(service)" *ngIf="!isServiceInCart(service)" | ||
[disabled]="getServiceTime(service) > remainingTime">Add to cart</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<div style="margin-bottom: 50px;"> | ||
<h3><strong>Maintenance Service</strong></h3> | ||
<h4>Your next scheduled maintenance is: <strong>Schedule {{this.nextScheduledService}}</strong> <button | ||
mat-raised-button (click)="addMaintenanceServicesToCart()" *ngIf="!maintenanceServiceAdded" | ||
style="margin-left: 10px;">Add to cart</button></h4> | ||
</div> | ||
<br><br> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.