Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom task type support, refactor tasks to be singular, cleaned up #903

Merged
merged 9 commits into from
Mar 13, 2024
1 change: 1 addition & 0 deletions packages/dashboard/src/components/appbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ export const AppBar = React.memo(({ extraToolbarItems }: AppBarProps): React.Rea
console.error(`Failed to create schedule: ${e.message}`);
showAlert('error', `Failed to submit schedule: ${e.message}`);
}}
allowCustomTask={resourceManager?.allowCustomTask}
/>
)}
</>
Expand Down
3 changes: 3 additions & 0 deletions packages/dashboard/src/managers/resource-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface ResourceConfigurationsType {
cartIds?: string[];
loggedInDisplayLevel?: string;
emergencyLots?: string[];
allowCustomTask?: boolean;
}

export default class ResourceManager {
Expand All @@ -34,6 +35,7 @@ export default class ResourceManager {
cartIds?: string[];
loggedInDisplayLevel?: string;
emergencyLots?: string[];
allowCustomTask?: boolean;

/**
* Gets the default resource manager using the embedded resource file (aka "assets/resources/main.json").
Expand Down Expand Up @@ -74,6 +76,7 @@ export default class ResourceManager {
this.cartIds = resources.cartIds || [];
this.loggedInDisplayLevel = resources.loggedInDisplayLevel;
this.emergencyLots = resources.emergencyLots || [];
this.allowCustomTask = resources.allowCustomTask ?? false;
}
}

Expand Down
Loading
Loading