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

Conversation

richardhjtan
Copy link
Contributor

@richardhjtan richardhjtan commented Jan 14, 2025

Refer to

What is changing

  • add new Task tab in CRM app
  • add new Task Planner into Task tab

CRM Task Planner

  • pretty similar, but in isolated mode: we are depending on CRM id parameter to load tasks

CRM Task

  • similar like sprint task, extends Task
  • instead of Project, we tied a task to an CRM app ( this might solve the query mentioned here )
  • instead of TeamMember, we use Contact with Representative as assignee because our representative (staff) save as contact right now
  • links to Account
  • links to Deal

Screenshot
Screenshot 2025-01-14 at 11 04 33 PM

Copy link

github-actions bot commented Jan 14, 2025

Host Test Results

    1 files  ±0      1 suites  ±0   21m 18s ⏱️ +12s
729 tests ±0  727 ✔️ ±0  2 💤 ±0  0 ±0 
734 runs  ±0  732 ✔️ ±0  2 💤 ±0  0 ±0 

Results for commit d324b1f. ± Comparison against base commit 0bc510e.

♻️ This comment has been updated with latest results.

index?: number;
}

export class CRMTaskPlannerIsolated extends Component<typeof CRMTaskPlanner> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was hoping there was more re-use of a component here. Can we extract a component from the isolated work tracker first.

If I had a list of todos and days of the week, cud I make a work tracker from that using the same template

Copy link
Contributor Author

@richardhjtan richardhjtan Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tintinthong indeed it's a good time to extract and reuse the base task planner component before it grows up on other use cases.

In this new base task planner component, we are able to pass dynamic columns config from the consumer level. Hence its doable on your scenario to map columns by days of the week inside the config

You may see some examples within the sprint planner and crm task planner in this PR, thanks

columns: TaskColumn[];
}

export class BaseTaskPlannerIsolated<
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it more straightforward to get this to be a GlimmerComponent that is used inside the isolated template?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tintinthong I was trying GlimmerComponent with straightforward type declaration like this

export class BaseTaskPlannerIsolated extends GlimmerComponent<BaseTaskPlannerIsolatedSignature> {

It turns out there is a bunch of lint errors because the base task planner is not extending to the type to SprintPlanner/TaskPlanner

https://github.com/cardstack/boxel/actions/runs/12823222126/job/35757386460?pr=2042

If I use something like this with GlimmerComponent it works now, but not sure is more straightforward

export class BaseTaskPlannerIsolated<
  T extends typeof CardDef = typeof CardDef,
> extends GlimmerComponent<
  BaseTaskPlannerIsolatedSignature & { Args: { model: InstanceType<T> } }
> {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted to original approach

@richardhjtan richardhjtan force-pushed the CS-7791-crm-task-planner branch from 23acc8b to 71bb5ba Compare January 17, 2025 05:47
Copy link
Contributor

@tintinthong tintinthong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. File a ticket for better refactoring of the task planner component

@richardhjtan
Copy link
Contributor Author

@richardhjtan richardhjtan merged commit 6b1cd5c into main Jan 17, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants