Skip to content

Commit

Permalink
Feat/1088/activity directive creator (#1095)
Browse files Browse the repository at this point in the history
* Update ActivityDirective type and gql query to include created_by field
* Add ActivityDirective created_by field to selected activity form and directives table column options
  • Loading branch information
AaronPlave authored Jan 30, 2024
1 parent 0efc74f commit 8c1e15a
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/activity/ActivityAnchorForm.svelte.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('Activity Anchor Form component', () => {
applied_preset: null,
arguments: {},
created_at: '2022-08-03T18:21:51',
created_by: 'admin',
id: 12,
last_modified_arguments_at: '2022-08-03T21:53:22',
last_modified_at: '2022-08-03T21:53:22',
Expand All @@ -28,6 +29,7 @@ describe('Activity Anchor Form component', () => {
applied_preset: null,
arguments: {},
created_at: '2022-08-03T18:21:51',
created_by: 'admin',
id: 13,
last_modified_arguments_at: '2022-08-03T21:53:22',
last_modified_at: '2022-08-03T21:53:22',
Expand All @@ -45,6 +47,7 @@ describe('Activity Anchor Form component', () => {
applied_preset: null,
arguments: {},
created_at: '2022-08-03T18:21:51',
created_by: 'admin',
id: 14,
last_modified_arguments_at: '2022-08-03T21:53:22',
last_modified_at: '2022-08-03T21:53:22',
Expand All @@ -62,6 +65,7 @@ describe('Activity Anchor Form component', () => {
applied_preset: null,
arguments: {},
created_at: '2022-08-03T18:21:51',
created_by: 'admin',
id: 15,
last_modified_arguments_at: '2022-08-03T21:53:22',
last_modified_at: '2022-08-03T21:53:22',
Expand Down
7 changes: 7 additions & 0 deletions src/components/activity/ActivityDirectiveForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,13 @@
</Input>
</Highlight>

<Highlight highlight={highlightKeysMap.last_modified_by}>
<Input layout="inline">
<label use:tooltip={{ content: 'Created By', placement: 'top' }} for="createdBy"> Created By </label>
<input class="st-input w-100" disabled name="createdBy" value={activityDirective.created_by} />
</Input>
</Highlight>

<Highlight highlight={highlightKeysMap.source_scheduling_goal_id}>
<Input layout="inline">
<label
Expand Down
16 changes: 16 additions & 0 deletions src/components/activity/ActivityDirectivesTablePanel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@
resizable: true,
sortable: true,
},
created_by: {
field: 'created_by',
filter: 'text',
headerName: 'Created By',
hide: true,
resizable: true,
sortable: true,
},
derived_start_time: {
field: 'derived_start_time',
filter: 'text',
Expand Down Expand Up @@ -137,6 +145,14 @@
resizable: true,
sortable: true,
},
last_modified_by: {
field: 'last_modified_by',
filter: 'text',
headerName: 'Last Modified By',
hide: true,
resizable: true,
sortable: true,
},
metadata: {
field: 'metadata',
filter: 'text',
Expand Down
8 changes: 8 additions & 0 deletions src/components/plan/PlanMergeReview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ describe('PlanMergeReview component', () => {
applied_preset: null,
arguments: {},
created_at: '2023-02-16T17:48:26',
created_by: 'admin',
id: 1,
last_modified_arguments_at: '2023-02-16T17:48:26',
last_modified_at: '2023-02-16T17:48:26',
Expand All @@ -150,6 +151,7 @@ describe('PlanMergeReview component', () => {
applied_preset: null,
arguments: {},
created_at: '2023-02-16T17:48:26',
created_by: 'admin',
id: 1,
last_modified_arguments_at: '2023-02-16T17:48:26',
last_modified_at: '2023-02-16T17:48:47',
Expand Down Expand Up @@ -190,6 +192,7 @@ describe('PlanMergeReview component', () => {
applied_preset: null,
arguments: {},
created_at: '2023-02-16T17:48:26',
created_by: 'admin',
id: 1,
last_modified_arguments_at: '2023-02-16T17:48:26',
last_modified_at: '2023-02-16T17:48:26',
Expand All @@ -209,6 +212,7 @@ describe('PlanMergeReview component', () => {
applied_preset: null,
arguments: {},
created_at: '2023-02-16T17:48:26',
created_by: 'admin',
id: 2,
last_modified_arguments_at: '2023-02-16T17:48:26',
last_modified_at: '2023-02-16T17:48:47',
Expand Down Expand Up @@ -250,6 +254,7 @@ describe('PlanMergeReview component', () => {
applied_preset: null,
arguments: {},
created_at: '2023-02-16T20:41:07',
created_by: 'admin',
id: 6,
last_modified_arguments_at: '2023-02-16T20:41:07',
last_modified_at: '2023-02-16T20:41:07',
Expand All @@ -276,6 +281,7 @@ describe('PlanMergeReview component', () => {
applied_preset: null,
arguments: {},
created_at: '2023-02-16T20:41:09',
created_by: 'admin',
id: 7,
last_modified_arguments_at: '2023-02-16T20:41:09',
last_modified_at: '2023-02-16T20:41:09',
Expand All @@ -299,6 +305,7 @@ describe('PlanMergeReview component', () => {
applied_preset: null,
arguments: {},
created_at: '2023-02-16T20:40:57',
created_by: 'admin',
id: 5,
last_modified_arguments_at: '2023-02-16T20:40:57',
last_modified_at: '2023-02-16T20:40:57',
Expand All @@ -317,6 +324,7 @@ describe('PlanMergeReview component', () => {
applied_preset: null,
arguments: {},
created_at: '2023-02-16T20:40:57',
created_by: 'admin',
id: 5,
last_modified_arguments_at: '2023-02-16T20:40:57',
last_modified_at: '2023-02-16T20:40:57',
Expand Down
1 change: 1 addition & 0 deletions src/types/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export type ActivityDirective = {
applied_preset?: AppliedPreset | null;
arguments: ArgumentsMap;
created_at: string;
created_by: string;
id: ActivityDirectiveId;
last_modified_arguments_at: string;
last_modified_at: string;
Expand Down
3 changes: 3 additions & 0 deletions src/utilities/activities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ describe('sortActivityDirectivesOrSpans', () => {
applied_preset: null,
arguments: {},
created_at: '2022-08-03T18:21:51',
created_by: 'admin',
id: 1,
last_modified_arguments_at: '2022-08-03T21:53:22',
last_modified_at: '2022-08-03T21:53:22',
Expand All @@ -122,6 +123,7 @@ describe('sortActivityDirectivesOrSpans', () => {
applied_preset: null,
arguments: {},
created_at: '2022-08-03T18:21:51',
created_by: 'admin',
id: 2,
last_modified_arguments_at: '2022-08-03T21:53:22',
last_modified_at: '2022-08-03T21:53:22',
Expand All @@ -140,6 +142,7 @@ describe('sortActivityDirectivesOrSpans', () => {
applied_preset: null,
arguments: {},
created_at: '2022-08-03T18:21:51',
created_by: 'admin',
id: 3,
last_modified_arguments_at: '2022-08-03T21:53:22',
last_modified_at: '2022-08-03T21:53:22',
Expand Down
1 change: 1 addition & 0 deletions src/utilities/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,7 @@ const gql = {
}
arguments
created_at
created_by
id
last_modified_arguments_at
last_modified_at
Expand Down

0 comments on commit 8c1e15a

Please sign in to comment.