Skip to content

Commit

Permalink
Clean up of emergency lots usage in config
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth committed May 10, 2024
1 parent 5f4393a commit 305791b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 55 deletions.
1 change: 0 additions & 1 deletion packages/dashboard/src/components/appbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ export const AppBar = React.memo(({ extraToolbarItems }: AppBarProps): React.Rea
cleaningZones={cleaningZoneNames}
pickupZones={resourceManager?.pickupZones}
cartIds={resourceManager?.cartIds}
emergencyLots={resourceManager?.emergencyLots}
pickupPoints={pickupPoints}
dropoffPoints={dropoffPoints}
favoritesTasks={favoritesTasks}
Expand Down
3 changes: 0 additions & 3 deletions packages/dashboard/src/managers/resource-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface ResourceConfigurationsType {
attributionPrefix?: string;
cartIds?: string[];
loggedInDisplayLevel?: string;
emergencyLots?: string[];
}

export default class ResourceManager {
Expand All @@ -33,7 +32,6 @@ export default class ResourceManager {
attributionPrefix?: string;
cartIds?: string[];
loggedInDisplayLevel?: string;
emergencyLots?: string[];

/**
* Gets the default resource manager using the embedded resource file (aka "assets/resources/main.json").
Expand Down Expand Up @@ -73,7 +71,6 @@ export default class ResourceManager {
this.attributionPrefix = resources.attributionPrefix || 'OSRC-SG';
this.cartIds = resources.cartIds || [];
this.loggedInDisplayLevel = resources.loggedInDisplayLevel;
this.emergencyLots = resources.emergencyLots || [];
}
}

Expand Down
51 changes: 0 additions & 51 deletions packages/react-components/lib/tasks/create-task.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,6 @@ export interface CreateTaskFormProps
patrolWaypoints?: string[];
pickupZones?: string[];
cartIds?: string[];
emergencyLots?: string[];
pickupPoints?: Record<string, string>;
dropoffPoints?: Record<string, string>;
favoritesTasks?: TaskFavorite[];
Expand All @@ -1352,7 +1351,6 @@ export function CreateTaskForm({
patrolWaypoints = [],
pickupZones = [],
cartIds = [],
emergencyLots = [],
pickupPoints = {},
dropoffPoints = {},
favoritesTasks = [],
Expand Down Expand Up @@ -1556,55 +1554,6 @@ export function CreateTaskForm({
request.requester = requester;
request.unix_millis_request_time = Date.now();

// if (
// taskDefinition === 'delivery_pickup' ||
// taskDefinition === 'delivery_sequential_lot_pickup' ||
// taskDefinition === 'delivery_area_pickup'
// ) {
// const goToOneOfThePlaces: GoToOneOfThePlacesActivity = {
// category: 'go_to_place',
// description: {
// one_of: emergencyLots.map((placeName) => {
// return {
// waypoint: placeName,
// };
// }),
// constraints: [
// {
// category: 'prefer_same_map',
// description: '',
// },
// ],
// },
// };

// // FIXME: there should not be any statically defined duration estimates as
// // it makes assumptions of the deployments.
// const deliveryDropoff: DropoffActivity = {
// category: 'perform_action',
// description: {
// unix_millis_action_duration_estimate: 60000,
// category: 'delivery_dropoff',
// description: {},
// },
// };
// const onCancelDropoff: OnCancelDropoff = {
// category: 'sequence',
// description: [goToOneOfThePlaces, deliveryDropoff],
// };
// request.description.phases[1].on_cancel = [onCancelDropoff];
// } else if (taskDefinition === 'custom_compose') {
// try {
// const obj = JSON.parse(request.description);
// request.category = 'compose';
// request.description = obj;
// } catch (e) {
// console.error('Invalid custom compose task description');
// onFail && onFail(e as Error, [request]);
// return;
// }
// }

if (taskDefinitionId === 'custom_compose') {
try {
const obj = JSON.parse(request.description);
Expand Down

0 comments on commit 305791b

Please sign in to comment.