Merge branch 'fixStatus' into 'main'
Removed useless status in matching sql request See merge request v3/service/matcher!29
This commit is contained in:
		
						commit
						0d537cd6a4
					
				| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "name": "@mobicoop/matcher",
 | 
					  "name": "@mobicoop/matcher",
 | 
				
			||||||
  "version": "1.5.3",
 | 
					  "version": "1.5.4",
 | 
				
			||||||
  "lockfileVersion": 3,
 | 
					  "lockfileVersion": 3,
 | 
				
			||||||
  "requires": true,
 | 
					  "requires": true,
 | 
				
			||||||
  "packages": {
 | 
					  "packages": {
 | 
				
			||||||
    "": {
 | 
					    "": {
 | 
				
			||||||
      "name": "@mobicoop/matcher",
 | 
					      "name": "@mobicoop/matcher",
 | 
				
			||||||
      "version": "1.5.3",
 | 
					      "version": "1.5.4",
 | 
				
			||||||
      "license": "AGPL",
 | 
					      "license": "AGPL",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "@grpc/grpc-js": "^1.9.14",
 | 
					        "@grpc/grpc-js": "^1.9.14",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "name": "@mobicoop/matcher",
 | 
					  "name": "@mobicoop/matcher",
 | 
				
			||||||
  "version": "1.5.3",
 | 
					  "version": "1.5.4",
 | 
				
			||||||
  "description": "Mobicoop V3 Matcher",
 | 
					  "description": "Mobicoop V3 Matcher",
 | 
				
			||||||
  "author": "sbriat",
 | 
					  "author": "sbriat",
 | 
				
			||||||
  "private": true,
 | 
					  "private": true,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
import { AdStatus, Frequency, Role } from '@modules/ad/core/domain/ad.types';
 | 
					import { Frequency, Role } from '@modules/ad/core/domain/ad.types';
 | 
				
			||||||
import { Selector } from '../algorithm.abstract';
 | 
					import { Selector } from '../algorithm.abstract';
 | 
				
			||||||
import { Waypoint } from '../../../types/waypoint.type';
 | 
					import { Waypoint } from '../../../types/waypoint.type';
 | 
				
			||||||
import { Point } from '../../../types/point.type';
 | 
					import { Point } from '../../../types/point.type';
 | 
				
			||||||
| 
						 | 
					@ -133,7 +133,6 @@ export class PassengerOrientedSelector extends Selector {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private _createWhere = (role: Role): string =>
 | 
					  private _createWhere = (role: Role): string =>
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
      this._whereStatus(),
 | 
					 | 
				
			||||||
      this._whereRole(role),
 | 
					      this._whereRole(role),
 | 
				
			||||||
      this._whereStrict(),
 | 
					      this._whereStrict(),
 | 
				
			||||||
      this._whereDate(),
 | 
					      this._whereDate(),
 | 
				
			||||||
| 
						 | 
					@ -145,8 +144,6 @@ export class PassengerOrientedSelector extends Selector {
 | 
				
			||||||
      .filter((where: string) => where != '')
 | 
					      .filter((where: string) => where != '')
 | 
				
			||||||
      .join(' AND ');
 | 
					      .join(' AND ');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private _whereStatus = (): string => `status='${AdStatus.VALID}'`;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  private _whereRole = (role: Role): string =>
 | 
					  private _whereRole = (role: Role): string =>
 | 
				
			||||||
    role == Role.PASSENGER ? 'driver=True' : 'passenger=True';
 | 
					    role == Role.PASSENGER ? 'driver=True' : 'passenger=True';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -53,10 +53,3 @@ export enum Role {
 | 
				
			||||||
  DRIVER = 'DRIVER',
 | 
					  DRIVER = 'DRIVER',
 | 
				
			||||||
  PASSENGER = 'PASSENGER',
 | 
					  PASSENGER = 'PASSENGER',
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
export enum AdStatus {
 | 
					 | 
				
			||||||
  PENDING = 'PENDING',
 | 
					 | 
				
			||||||
  VALID = 'VALID',
 | 
					 | 
				
			||||||
  INVALID = 'INVALID',
 | 
					 | 
				
			||||||
  SUSPENDED = 'SUSPENDED',
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue