website icon indicating copy to clipboard operation
website copied to clipboard

add LastSetPausedAt column to users

Open lorena-davila2025 opened this issue 8 months ago • 6 comments

https://github.com/the-clothing-loop/website/issues/859

lorena-davila2025 avatar May 02 '25 14:05 lorena-davila2025

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

lil5 avatar May 03 '25 13:05 lil5

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 avatar May 05 '25 18:05 lorena-davila2025

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 avatar May 05 '25 19:05 lorena-davila2025

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

lorena-davila2025 avatar May 05 '25 23:05 lorena-davila2025

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.

lil5 avatar May 07 '25 16:05 lil5

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!

lorena-davila2025 avatar May 07 '25 16:05 lorena-davila2025