Commit 49f9ab63 authored by Julien's avatar Julien
Browse files

merge Raph

parents b4846cd2 6a72d939
Pipeline #17280 failed with stages
in 1 minute and 36 seconds
......@@ -6821,8 +6821,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
......@@ -6843,14 +6842,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -6865,20 +6862,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -6995,8 +6989,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
......@@ -7008,7 +7001,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -7023,7 +7015,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -7031,14 +7022,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
......@@ -7057,7 +7046,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -7138,8 +7126,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
......@@ -7151,7 +7138,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -7237,8 +7223,7 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -7274,7 +7259,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -7294,7 +7278,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -7338,14 +7321,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......
......@@ -76,10 +76,22 @@ public class CourseResource {
@PutMapping("/courses")
@Timed
public ResponseEntity<Course> updateCourse(@Valid @RequestBody Course course) throws URISyntaxException {
log.debug("==============================================");
log.debug("REST request to update Course : {}", course);
if (course.getId() == null) {
log.debug("==============================================");
log.debug("============== NOK ==============");
log.debug("==============================================");
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
log.debug("==============================================");
log.debug("============== OK ==============");
log.debug("==============================================");
Course result = courseRepository.save(course);
courseSearchRepository.save(result);
return ResponseEntity.ok()
......@@ -144,8 +156,8 @@ public class CourseResource {
.stream(courseSearchRepository.search(queryStringQuery(query)).spliterator(), false)
.collect(Collectors.toList());
}
/**
* GET /coursesLate : get all late courses.
*
......@@ -155,12 +167,12 @@ public class CourseResource {
@Timed
public List<Course> getAllLateCourses() {
log.debug("REST request to get all Late Courses");
return courseRepository.getLateCourses();
}
/**
* GET /coursesWaiting : get all waiting courses.
*
......@@ -170,11 +182,11 @@ public class CourseResource {
@Timed
public List<Course> getAllWaitingCourses() {
log.debug("REST request to get all Waiting Courses");
return courseRepository.getWaitingCourses();
}
/**
* GET /coursesInProgress : get all in progress courses.
*
......@@ -184,11 +196,11 @@ public class CourseResource {
@Timed
public List<Course> getAllInProgressCourses() {
log.debug("REST request to get all in progress Courses");
return courseRepository.getInProgressCourses();
}
/**
* GET /coursesDone : get all done courses for the last day.
*
......@@ -198,10 +210,10 @@ public class CourseResource {
@Timed
public List<Course> getAllDoneCourses() {
log.debug("REST request to get all in progress Courses");
return courseRepository.getDoneCourses();
}
}
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { RouterModule, Routes } from '@angular/router';
import { errorRoute, navbarRoute } from './layouts';
import { DEBUG_INFO_ENABLED } from 'app/app.constants';
......
......@@ -17,6 +17,11 @@ export class CourseService {
private resourceUrl = SERVER_API_URL + 'api/courses';
private resourceSearchUrl = SERVER_API_URL + 'api/_search/courses';
private resourceUrlLate = SERVER_API_URL + 'api/coursesLate';
private resourceUrlWait = SERVER_API_URL + 'api/coursesWaiting';
private resourceUrlNow = SERVER_API_URL + 'api/coursesInProgress';
private resourceUrlDone = SERVER_API_URL + 'api/coursesDone';
constructor(private http: HttpClient) {}
create(course: ICourse): Observable<EntityResponseType> {
......@@ -28,6 +33,8 @@ export class CourseService {
update(course: ICourse): Observable<EntityResponseType> {
const copy = this.convertDateFromClient(course);
console.log('Course :');
console.log(course);
return this.http
.put<ICourse>(this.resourceUrl, copy, { observe: 'response' })
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
......@@ -81,4 +88,34 @@ export class CourseService {
});
return res;
}
// -------------------------------------------------------------------------
queryLate(req?: any): Observable<EntityArrayResponseType> {
const options = createRequestOption(req);
return this.http
.get<ICourse[]>(this.resourceUrlLate, { params: options, observe: 'response' })
.pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res)));
}
queryWait(req?: any): Observable<EntityArrayResponseType> {
const options = createRequestOption(req);
return this.http
.get<ICourse[]>(this.resourceUrlWait, { params: options, observe: 'response' })
.pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res)));
}
queryNow(req?: any): Observable<EntityArrayResponseType> {
const options = createRequestOption(req);
return this.http
.get<ICourse[]>(this.resourceUrlNow, { params: options, observe: 'response' })
.pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res)));
}
queryDone(req?: any): Observable<EntityArrayResponseType> {
const options = createRequestOption(req);
return this.http
.get<ICourse[]>(this.resourceUrlDone, { params: options, observe: 'response' })
.pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res)));
}
}
......@@ -143,6 +143,12 @@
<span jhiTranslate="global.menu.manager.agencyManagement">Agency management</span>
</a>
</li>
<li>
<a class="dropdown-item" routerLink="manager/taxi-management" routerLinkActive="active" (click)="collapseNavbar()">
<fa-icon [icon]="'office'" [fixedWidth]="true"></fa-icon>
<span jhiTranslate="global.menu.manager.taxiManagement">Taxi management</span>
</a>
</li>
</ul>
</li>
<li *jhiHasAnyAuthority="'ROLE_ADMIN'" ngbDropdown class="nav-item dropdown pointer" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
......
......@@ -4,13 +4,192 @@ import { JhiLanguageService } from 'ng-jhipster';
import { JhiLanguageHelper } from 'app/core';
import { MyTransportSharedModule } from 'app/shared';
import { managerState } from './manager.route';
import { managerRoutes } from './manager.route';
// -------------------------------------------------------------------
import { AgenciesManagementComponent } from './agencies-management/agencies-management.component';
import { RentingRateComponent } from './agencies-management/renting-rate/renting-rate.component';
import { TaxiManagementComponent } from './taxi-management/taxi-management.component';
// -------------------------------------------------------------------
// Date
// -------------------------------------------------------------------
import { DateComponent } from './taxi-management/date/date.component';
// -------------------------------------------------------------------
// Selecteur
// -------------------------------------------------------------------
import { SelectorComponent } from './taxi-management/selector/selector.component';
import { SelectorListLateComponent } from './taxi-management/selector/lists/late/late.component';
import { SelectorListWaitComponent } from './taxi-management/selector/lists/wait/wait.component';
import { SelectorListNowComponent } from './taxi-management/selector/lists/now/now.component';
import { SelectorListDoneComponent } from './taxi-management/selector/lists/done/done.component';
// -------------------------------------------------------------------
// Courses Late
// -------------------------------------------------------------------
import { LateComponent } from './taxi-management/course-late/course-late.component';
import { LateBarComponent } from './taxi-management/course-late/bar/bar.component';
import { LateBottomComponent } from './taxi-management/course-late/bottom/bottom.component';
import { LateLeftComponent } from './taxi-management/course-late/left/left.component';
import { LateRightComponent } from './taxi-management/course-late/right/right.component';
import { LateStep1Component } from './taxi-management/course-late/step1/step1.component';
import { LateStep1CourseListComponent } from './taxi-management/course-late/step1/course-list/course-list.component';
import { LateStep1CourseDetailComponent } from './taxi-management/course-late/step1/course-detail/course-detail.component';
import { LateStep2Component } from './taxi-management/course-late/step2/step2.component';
import { LateStep2TaxiListComponent } from './taxi-management/course-late/step2/taxi-list/taxi-list.component';
import { LateStep2TaxiDetailComponent } from './taxi-management/course-late/step2/taxi-detail/taxi-detail.component';
import { LateStep3Component } from './taxi-management/course-late/step3/step3.component';
import { LateStep3CourseDetailComponent } from './taxi-management/course-late/step3/course-detail/course-detail.component';
import { LateStep3CourseButtonComponent } from './taxi-management/course-late/step3/course-button/course-button.component';
import { LateStep3TaxiDetailComponent } from './taxi-management/course-late/step3/taxi-detail/taxi-detail.component';
import { LateStep3TaxiButtonComponent } from './taxi-management/course-late/step3/taxi-button/taxi-button.component';
// -------------------------------------------------------------------
// Courses Wait
// -------------------------------------------------------------------
import { WaitComponent } from './taxi-management/course-wait/course-wait.component';
import { WaitBarComponent } from './taxi-management/course-wait/bar/bar.component';
import { WaitBottomComponent } from './taxi-management/course-wait/bottom/bottom.component';
import { WaitLeftComponent } from './taxi-management/course-wait/left/left.component';
import { WaitRightComponent } from './taxi-management/course-wait/right/right.component';
import { WaitStep1Component } from './taxi-management/course-wait/step1/step1.component';
import { WaitStep1CourseListComponent } from './taxi-management/course-wait/step1/course-list/course-list.component';
import { WaitStep1CourseDetailComponent } from './taxi-management/course-wait/step1/course-detail/course-detail.component';
import { WaitStep2Component } from './taxi-management/course-wait/step2/step2.component';
import { WaitStep2TaxiListComponent } from './taxi-management/course-wait/step2/taxi-list/taxi-list.component';
import { WaitStep2TaxiDetailComponent } from './taxi-management/course-wait/step2/taxi-detail/taxi-detail.component';
import { WaitStep3Component } from './taxi-management/course-wait/step3/step3.component';
import { WaitStep3CourseDetailComponent } from './taxi-management/course-wait/step3/course-detail/course-detail.component';
import { WaitStep3CourseButtonComponent } from './taxi-management/course-wait/step3/course-button/course-button.component';
import { WaitStep3TaxiDetailComponent } from './taxi-management/course-wait/step3/taxi-detail/taxi-detail.component';
import { WaitStep3TaxiButtonComponent } from './taxi-management/course-wait/step3/taxi-button/taxi-button.component';
// -------------------------------------------------------------------
// Courses Now
// -------------------------------------------------------------------
import { NowComponent } from './taxi-management/course-now/course-now.component';
import { NowBarComponent } from './taxi-management/course-now/bar/bar.component';
import { NowBottomComponent } from './taxi-management/course-now/bottom/bottom.component';
import { NowLeftComponent } from './taxi-management/course-now/left/left.component';
import { NowRightComponent } from './taxi-management/course-now/right/right.component';
import { NowStep1Component } from './taxi-management/course-now/step1/step1.component';
import { NowStep1CourseListComponent } from './taxi-management/course-now/step1/course-list/course-list.component';
import { NowStep1CourseDetailComponent } from './taxi-management/course-now/step1/course-detail/course-detail.component';
// -------------------------------------------------------------------
// Courses Done
// -------------------------------------------------------------------
import { DoneComponent } from './taxi-management/course-done/course-done.component';
import { DoneBarComponent } from './taxi-management/course-done/bar/bar.component';
import { DoneBottomComponent } from './taxi-management/course-done/bottom/bottom.component';
import { DoneLeftComponent } from './taxi-management/course-done/left/left.component';
import { DoneRightComponent } from './taxi-management/course-done/right/right.component';
import { DoneStep1Component } from './taxi-management/course-done/step1/step1.component';
import { DoneStep1CourseListComponent } from './taxi-management/course-done/step1/course-list/course-list.component';
import { DoneStep1CourseDetailComponent } from './taxi-management/course-done/step1/course-detail/course-detail.component';
@NgModule({
imports: [MyTransportSharedModule, RouterModule.forChild(managerState)],
declarations: [AgenciesManagementComponent, RentingRateComponent],
// imports: [MyTransportSharedModule, RouterModule.forChild(managerState)],
// declarations: [AgenciesManagementComponent, RentingRateComponent],
imports: [MyTransportSharedModule, RouterModule.forChild(managerRoutes)],
declarations: [
// ---------------
// ---------------
AgenciesManagementComponent,
RentingRateComponent,
TaxiManagementComponent,
// ---------------
// ---------------
DateComponent,
// ---------------
SelectorComponent,
SelectorListLateComponent,
SelectorListWaitComponent,
SelectorListNowComponent,
SelectorListDoneComponent,
// ---------------
// ---------------
LateComponent,
LateBarComponent,
LateBottomComponent,
LateLeftComponent,
LateRightComponent,
// ---------------
LateStep1Component,
LateStep1CourseListComponent,
LateStep1CourseDetailComponent,
// ---------------
LateStep2Component,
LateStep2TaxiListComponent,
LateStep2TaxiDetailComponent,
// ---------------
LateStep3Component,
LateStep3CourseDetailComponent,
LateStep3CourseButtonComponent,
LateStep3TaxiDetailComponent,
LateStep3TaxiButtonComponent,
// ---------------
// ---------------
WaitComponent,
WaitBarComponent,
WaitBottomComponent,
WaitLeftComponent,
WaitRightComponent,
// ---------------
WaitStep1Component,
WaitStep1CourseListComponent,
WaitStep1CourseDetailComponent,
// ---------------
WaitStep2Component,
WaitStep2TaxiListComponent,
WaitStep2TaxiDetailComponent,
// ---------------
WaitStep3Component,
WaitStep3CourseDetailComponent,
WaitStep3CourseButtonComponent,
WaitStep3TaxiDetailComponent,
WaitStep3TaxiButtonComponent,
// ---------------
// ---------------
NowComponent,
NowBarComponent,
NowBottomComponent,
NowLeftComponent,
NowRightComponent,
// ---------------
NowStep1Component,
NowStep1CourseListComponent,
NowStep1CourseDetailComponent,
// ---------------
// ---------------
DoneComponent,
DoneBarComponent,
DoneBottomComponent,
DoneLeftComponent,
DoneRightComponent,
// ---------------
DoneStep1Component,
DoneStep1CourseListComponent,
DoneStep1CourseDetailComponent
// ---------------
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class MyTransportManagerModule {
......
import { Routes } from '@angular/router';
import { agenciesMngmtRoute } from './agencies-management/agencies-management.route';
import { TaxiMngmtRoute } from './taxi-management/taxi-management.route';
import { UserRouteAccessService } from 'app/core';
const MANAGER_ROUTES = [agenciesMngmtRoute];
const MANAGER_ROUTES = [agenciesMngmtRoute, TaxiMngmtRoute];
export const managerState: Routes = [
export const managerRoutes: Routes = [
{
path: '',
data: {
......
<div class="block_bar">
<div *ngIf="barService.get_step() == 0">
<p></p>
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" style="width:0%"></div>
</div>
<div *ngIf="barService.get_step() == 1">
<p jhiTranslate="myTransportApp.taximngmt.done.bar.step1"> Etape 1 : Sélection d'une course </p>
<div *ngIf="barService.get_full() == false" class="progress">
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="3" style="width:3%"></div>
</div>
<div *ngIf="barService.get_full() == true" class="progress">
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="100" style="width:100%"></div>
</div>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import { DoneBarService } from './bar.service';
@Component({
selector: 'jhi-done-bar',
templateUrl: './bar.component.html',
styleUrls: ['../../taxi-management.scss']
})
export class DoneBarComponent implements OnInit {
constructor(private barService: DoneBarService) {}
ngOnInit() {}
}
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class DoneBarService {
private step = 0;
private full = false;
set_step(step: number, full: boolean) {
this.step = step;
this.full = full;
}
get_step() {
return this.step;
}
get_full() {
return this.full;
}
reset() {
this.step = 0;
this.full = false;
}
}