Skip to content

[PERTE-330] Update task card with the new design and behaviour #1993

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

Merged
merged 36 commits into from
Jun 6, 2025

Conversation

JuanIgAcosta
Copy link
Contributor

@JuanIgAcosta JuanIgAcosta commented May 16, 2025

Issue: #330

Related PRs:

Related issues:


Consider the task boxes to be like:
Image

Tasks:

  • Get missing data from backend that needs to be displayed (PR #5003)
    • Order price
    • Task comments
      (check if task.comments is fine enough or if there are more "comments" saved elsewhere)
  • Apply the layout to the task card/box following the figma design.
  • Add support to swipe right and left for unassigned tasks.
    Both should make appear the list of couriers to assign:
    • Swipe right (shows the square in the left): Should assign the order as a whole.
    • Swipe left (shows the square in the right): Should assign the task as individual item.
  • Add support to swipe right and left for assigned tasks.
    The swipes are the same as for unassigned, both should make appear the list of couriers but with the unassign option in the 1st place (see below).
  • The list of couriers + unassign could be something like:
    • The "unassign" option first as a button
    • Then, the list of all couriers
    • Pressing a new courier should reassign the task/s
  • Pressing anywhere in the white rectangle with task data. will go to the specific/individual task details.
    (that task detail view already exists, we just reuse it)
  • Pressing the square with the order info goes to the order/delivery details.
    • The order detail view is to be done at Order details page coopcycle#199
    • For now, just do nothing, but let the component prepared to quickly add the onClick fn later.
  • If the task is an standalone one (it's not a part of an order) show a gray square with the coopcycle logo and the taskId in the place in where the resto/store name would be.
  • Add the vertical coloured bar (yellow and red) depending on the task time.
    • Yellow: 10 mins remaining
    • Red: already past the delivery date/time
    • It has to be calculated with the ending hour of the range, ie: if the dropoff is between 16:45 and 17:00, we have to take/use 17:00 for calculation
  • Add background color to swipe buttons.
  • Check if everything works fine from courier section!
    • We are going to use the same TaskListItem for both dispatcher and courier screens/sections.
    • We need to make sure that also the courier section behaves as expected.

This PR updates dev-dependencies so a yarn install is required.

@diegomanuel diegomanuel changed the title Feature/330 new design task card [PERTE-330] Update task card with the new design and behaviour May 16, 2025
@diegomanuel diegomanuel added enhancement Dispatch Interface An issue related to dispatch´s interface. Ex: The admin and orders dashboards, using matomo, tags Cooperative: Transversal Concepts labels May 16, 2025
@diegomanuel diegomanuel marked this pull request as ready for review June 5, 2025 18:26
Copy link
Member

@diegomanuel diegomanuel left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -7,7 +7,8 @@ import { itif } from '../utils';

const USERNAME = 'jane';

describe('Dispatch - Bulk assign tasks', () => {
// Skip it just for this branch
describe.skip('Dispatch - Bulk assign tasks', () => {
Copy link
Member

Choose a reason for hiding this comment

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

This should be re-enabled at #1994!

@diegomanuel diegomanuel merged commit 6e5786f into master Jun 6, 2025
4 of 5 checks passed
@diegomanuel diegomanuel deleted the feature/330-new-design-task-card branch June 6, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cooperative: Transversal Concepts Dispatch Interface An issue related to dispatch´s interface. Ex: The admin and orders dashboards, using matomo, tags enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants