Skip to content

add LastSetPausedAt column to users#866

Draft
lorena-davila2025 wants to merge 2 commits intothe-clothing-loop:mainfrom
lorena-davila2025:last-set-paused
Draft

add LastSetPausedAt column to users#866
lorena-davila2025 wants to merge 2 commits intothe-clothing-loop:mainfrom
lorena-davila2025:last-set-paused

Conversation

@lorena-davila2025
Copy link
Copy Markdown
Contributor

@lil5
Copy link
Copy Markdown
Member

lil5 commented May 3, 2025

Now that value needs to be set to = NOW() for each time someone changes their pause status

@lorena-davila2025
Copy link
Copy Markdown
Contributor Author

lorena-davila2025 commented May 5, 2025

Cases

"Select pause duration"
Payload:

{
    "user_uid": "752e0f51-08bf-4ae7-bb02-e6acae45c5c0",
    "paused_until": "2025-05-31T14:26:00-04:00"
}

"Pause for this loop"
Payload:

{
    "user_uid": "752e0f51-08bf-4ae7-bb02-e6acae45c5c0",
    "chain_uid": "95cc4714-87f8-414d-9fa6-327e9c4e2782",
    "chain_paused": true
}
**And then unpause**
   {
      "user_uid": "752e0f51-08bf-4ae7-bb02-e6acae45c5c0",
      "chain_uid": "95cc4714-87f8-414d-9fa6-327e9c4e2782",
      "chain_paused": false,
      "paused_until": "2025-04-28T14:38:44-04:00"
     }

"Until I turn it back on"
Payload:

{
    "user_uid": "752e0f51-08bf-4ae7-bb02-e6acae45c5c0",
    "paused_until": "2125-05-05T14:28:22-04:00"
}

Unpause for case 1 and 3
Payload:

{
    "user_uid": "752e0f51-08bf-4ae7-bb02-e6acae45c5c0",
    "paused_until": "2025-04-28T14:31:47-04:00"
}

@lorena-davila2025 lorena-davila2025 marked this pull request as draft May 5, 2025 18:57
@lorena-davila2025
Copy link
Copy Markdown
Contributor Author

Now that value needs to be set to = NOW() for each time someone changes their pause status

Tested for different cases and the column is being set when pausing and unpausing too, hope that is correct.

@lorena-davila2025
Copy link
Copy Markdown
Contributor Author

Hey, about showing the Pause duration to the host:
-could it be a conditional column on the Routes Table in the Loop page?

-can we reuse the logic in the App -> Settings, to show the pause duration? And also copy the app/src/utils/is_paused.ts related files to the frontend?

After a user pauses participation in the app, it renders one of these:

  -"3 weeks"
  -"Only for this loop"
  -"Until I turn it back on"

In the frontend, could we say:

    -"3 weeks"
    -"Indefinte"
    -"Indefinte"
    -"-" for the active participants
Screenshot 2025-05-05 at 7 33 24 PM

@lil5
Copy link
Copy Markdown
Member

lil5 commented May 7, 2025

Although the backend code works well (nice one!), I won't be merging it until we have some input from Paloeka on how it is displayed, next week Monday 12 I'll have some answers at the dev meeting.

@lorena-davila2025
Copy link
Copy Markdown
Contributor Author

Although the backend code works well (nice one!), I won't be merging it until we have some input from Paloeka on how it is displayed, next week Monday 12 I'll have some answers at the dev meeting.

Great, thanks!

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