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

CS-7790 CS-7791 New CRM task tab and planner #2042

Merged
merged 10 commits into from
Jan 17, 2025
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"data": {
"type": "card",
"attributes": {
"status": {
"index": 2,
"label": "Done",
"color": "#66BB6A",
"completed": true
},
"dateRange": {
"start": null,
"end": null
},
"priority": {
"index": null,
"label": null
},
"name": "Quotation Adjustment",
"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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"data": {
"type": "card",
"attributes": {
"status": {
"index": 0,
"label": "Not Started",
"color": null,
"completed": false
},
"dateRange": {
"start": null,
"end": null
},
"priority": {
"index": 2,
"label": "Medium"
},
"name": "Meet Prospect Customer",
"details": null,
"description": null,
"thumbnailURL": null
},
"relationships": {
"crmApp": {
"links": {
"self": "../CrmApp/4e73712d-2a31-4ffe-9c22-d3de277257a6"
}
},
"subtasks": {
"links": {
"self": null
}
},
"assignee": {
"links": {
"self": "../Representative/e0b16307-04bd-4e48-bdf8-517bb35b8119"
}
},
"contact": {
"links": {
"self": null
}
},
"account": {
"links": {
"self": null
}
},
"deal": {
"links": {
"self": null
}
},
"tags": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/crm-task",
"name": "CRMTask"
}
}
}
}
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": "Edit Quotation on Item A",
"details": "The quantity should be 50, instead of 100.",
"description": null,
"thumbnailURL": null
},
"relationships": {
"crmApp": {
"links": {
"self": "../CrmApp/4e73712d-2a31-4ffe-9c22-d3de277257a6"
}
},
"subtasks": {
"links": {
"self": null
}
},
"assignee": {
"links": {
"self": "../Contact/461ab2c9-6787-4719-b7bb-d6fdd40414a8"
}
},
"contact": {
"links": {
"self": null
}
},
"account": {
"links": {
"self": null
}
},
"deal": {
"links": {
"self": null
}
},
"tags": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/crm-task",
"name": "CRMTask"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"data": {
"type": "card",
"attributes": {
"firstName": "Andy",
"lastName": null,
"position": "Sales Manager",
"department": "Sales",
"primaryEmail": null,
"secondaryEmail": null,
"phoneMobile": {
"phoneNumber": {
"number": null,
"countryCode": null
},
"type": {
"index": null,
"label": null,
"color": null,
"colorScheme": {
"foregroundColor": null,
"backgroundColor": null
}
}
},
"phoneOffice": {
"phoneNumber": {
"number": null,
"countryCode": null
},
"type": {
"index": null,
"label": null,
"color": null,
"colorScheme": {
"foregroundColor": null,
"backgroundColor": null
}
}
},
"socialLinks": [],
"statusTag": {
"lightColor": null,
"darkColor": null,
"index": null,
"label": null,
"color": null,
"colorScheme": {
"foregroundColor": null,
"backgroundColor": null
}
},
"description": null,
"thumbnailURL": null
},
"relationships": {
"company": {
"links": {
"self": null
}
}
},
"meta": {
"adoptsFrom": {
"module": "../crm/contact",
"name": "Contact"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@
"module": "crm/deal"
},
"isTable": false
},
{
"displayName": "Tasks",
"tabId": "Task",
"ref": {
"name": "Task",
"module": "crm/task"
},
"isTable": false
}
],
"headerIcon": {
Expand Down
16 changes: 16 additions & 0 deletions packages/experiments-realm/crm-app.gts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { urgencyTagValues } from './crm/account';
import { dealStatusValues } from './crm/deal';
import type { Deal } from './crm/deal';
import DealSummary from './crm/deal-summary';
import { CRMTaskPlannerIsolated } from './crm/task-planner';

type ViewOption = 'card' | 'strip' | 'grid';

Expand Down Expand Up @@ -103,6 +104,14 @@ const ACCOUNT_FILTERS: LayoutFilter[] = [
createNewButtonText: tag.buttonText,
})),
];
const TASK_FILTERS: LayoutFilter[] = [
{
displayName: 'All Tasks',
icon: CalendarExclamation,
cardTypeName: 'CRM Task',
createNewButtonText: 'Create Task',
},
];

// need to use as typeof AppCard rather than CrmApp otherwise tons of lint errors
class CrmAppTemplate extends Component<typeof AppCard> {
Expand All @@ -111,6 +120,7 @@ class CrmAppTemplate extends Component<typeof AppCard> {
['Contact', CONTACT_FILTERS],
['Deal', DEAL_FILTERS],
['Account', ACCOUNT_FILTERS],
['Task', TASK_FILTERS],
]);
@tracked private activeFilter: LayoutFilter = CONTACT_FILTERS[0];
@action private onFilterChange(filter: LayoutFilter) {
Expand Down Expand Up @@ -429,6 +439,12 @@ class CrmAppTemplate extends Component<typeof AppCard> {
class='crm-app-grid'
/>
{{/if}}
{{#if (eq this.activeTabId 'Task')}}
<CRMTaskPlannerIsolated
@model={{this.args.model}}
@context={{@context}}
/>
{{/if}}
richardhjtan marked this conversation as resolved.
Show resolved Hide resolved
</:grid>
</Layout>
<style scoped>
Expand Down
Loading
Loading