Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
woksin committed Feb 10, 2025
1 parent 4cad852 commit 6d968a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
18 changes: 9 additions & 9 deletions Source/Workbench/Web/Api/Jobs/AllJobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,26 @@ const routeTemplate = Handlebars.compile('/api/event-store/{{eventStore}}/{{name

class AllJobsSortBy {
private _id: SortingActionsForObservableQuery<Job[]>;
private _name: SortingActionsForObservableQuery<Job[]>;
private _details: SortingActionsForObservableQuery<Job[]>;
private _type: SortingActionsForObservableQuery<Job[]>;
private _status: SortingActionsForObservableQuery<Job[]>;
private _created: SortingActionsForObservableQuery<Job[]>;
private _statusChanges: SortingActionsForObservableQuery<Job[]>;
private _progress: SortingActionsForObservableQuery<Job[]>;

constructor(readonly query: AllJobs) {
this._id = new SortingActionsForObservableQuery<Job[]>('id', query);
this._name = new SortingActionsForObservableQuery<Job[]>('name', query);
this._details = new SortingActionsForObservableQuery<Job[]>('details', query);
this._type = new SortingActionsForObservableQuery<Job[]>('type', query);
this._status = new SortingActionsForObservableQuery<Job[]>('status', query);
this._created = new SortingActionsForObservableQuery<Job[]>('created', query);
this._statusChanges = new SortingActionsForObservableQuery<Job[]>('statusChanges', query);
this._progress = new SortingActionsForObservableQuery<Job[]>('progress', query);
}

get id(): SortingActionsForObservableQuery<Job[]> {
return this._id;
}
get name(): SortingActionsForObservableQuery<Job[]> {
return this._name;
}
get details(): SortingActionsForObservableQuery<Job[]> {
return this._details;
}
Expand All @@ -45,6 +42,9 @@ class AllJobsSortBy {
get status(): SortingActionsForObservableQuery<Job[]> {
return this._status;
}
get created(): SortingActionsForObservableQuery<Job[]> {
return this._created;
}
get statusChanges(): SortingActionsForObservableQuery<Job[]> {
return this._statusChanges;
}
Expand All @@ -55,19 +55,16 @@ class AllJobsSortBy {

class AllJobsSortByWithoutQuery {
private _id: SortingActions = new SortingActions('id');
private _name: SortingActions = new SortingActions('name');
private _details: SortingActions = new SortingActions('details');
private _type: SortingActions = new SortingActions('type');
private _status: SortingActions = new SortingActions('status');
private _created: SortingActions = new SortingActions('created');
private _statusChanges: SortingActions = new SortingActions('statusChanges');
private _progress: SortingActions = new SortingActions('progress');

get id(): SortingActions {
return this._id;
}
get name(): SortingActions {
return this._name;
}
get details(): SortingActions {
return this._details;
}
Expand All @@ -77,6 +74,9 @@ class AllJobsSortByWithoutQuery {
get status(): SortingActions {
return this._status;
}
get created(): SortingActions {
return this._created;
}
get statusChanges(): SortingActions {
return this._statusChanges;
}
Expand Down
7 changes: 4 additions & 3 deletions Source/Workbench/Web/Api/Jobs/Job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import { Guid } from '@cratis/fundamentals';
import { JobProgress } from './JobProgress';
import { JobStatus } from './JobStatus';
import { JobStatusChanged } from './JobStatusChanged';
import { SerializableDateTimeOffset } from '../Primitives/SerializableDateTimeOffset';

export class Job {

@field(Guid)
id!: Guid;

@field(String)
name!: string;

@field(String)
details!: string;

Expand All @@ -27,6 +25,9 @@ export class Job {
@field(Number)
status!: JobStatus;

@field(SerializableDateTimeOffset)
created!: SerializableDateTimeOffset;

@field(JobStatusChanged, true)
statusChanges!: JobStatusChanged[];

Expand Down

0 comments on commit 6d968a9

Please sign in to comment.