Skip to content

Commit

Permalink
CRM task planner extends base task planner
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhjtan committed Jan 16, 2025
1 parent 046b1c7 commit ac3b69d
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 607 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"status": {
"index": 1,
"label": "In Progress",
"color": null,
"color": "#FFB74D",
"completed": false
},
"dateRange": {
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"assignee": {
"links": {
"self": "../Contact/461ab2c9-6787-4719-b7bb-d6fdd40414a8"
"self": "../Representative/880c1d41-2563-43da-999d-ef577fa3eac9"
}
},
"contact": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"data": {
"type": "card",
"attributes": {
"status": {
"index": 1,
"label": "In Progress",
"color": null,
"completed": false
},
"dateRange": {
"start": null,
"end": null
},
"priority": {
"index": null,
"label": null
},
"name": null,
"details": null,
"description": null,
"thumbnailURL": null
},
"relationships": {
"crmApp": {
"links": {
"self": "../CrmApp/4e73712d-2a31-4ffe-9c22-d3de277257a6"
}
},
"subtasks": {
"links": {
"self": null
}
},
"assignee": {
"links": {
"self": null
}
},
"contact": {
"links": {
"self": null
}
},
"account": {
"links": {
"self": null
}
},
"deal": {
"links": {
"self": null
}
},
"tags": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/crm-task",
"name": "CRMTask"
}
}
}
}
14 changes: 10 additions & 4 deletions packages/experiments-realm/crm-app.gts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,15 @@ class CrmAppTemplate extends Component<typeof AppCard> {
{{/if}}
</:contentHeader>
<:grid>
{{#if this.query}}
{{#if (eq this.activeTabId 'Task')}}
<CRMTaskPlannerIsolated
@model={{@model}}
@context={{@context}}
@fields={{@fields}}
@set={{@set}}
@fieldName={{@fieldName}}
/>
{{else if this.query}}
<CardsGrid
@query={{this.query}}
@realms={{this.realms}}
Expand All @@ -441,9 +449,7 @@ class CrmAppTemplate extends Component<typeof AppCard> {
class='crm-app-grid'
/>
{{/if}}
{{#if (eq this.activeTabId 'Task')}}
<CRMTaskPlannerIsolated @model={{@model}} @context={{@context}} />
{{/if}}

</:grid>
</Layout>
<style scoped>
Expand Down
3 changes: 2 additions & 1 deletion packages/experiments-realm/crm/crm-task.gts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
import CheckboxIcon from '@cardstack/boxel-icons/checkbox';
import Calendar from '@cardstack/boxel-icons/calendar';
import { Contact } from './contact';
import { Representative } from './representative';
import { Account } from './account';
import { Deal } from './deal';
import { Task, TaskStatusField, getDueDateStatus } from '../task';
Expand Down Expand Up @@ -386,7 +387,7 @@ export class CRMTask extends Task {
},
});

@field assignee = linksTo(() => Contact);
@field assignee = linksTo(() => Representative);
@field contact = linksTo(Contact);
@field account = linksTo(Account);
@field deal = linksTo(Deal);
Expand Down
Loading

0 comments on commit ac3b69d

Please sign in to comment.