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

Added waiting time to waiting step (#460) #590

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

xpavle00
Copy link
Collaborator

@xpavle00 xpavle00 commented Jun 27, 2023

Ahojte,
PR vznikol v ramci hackday ako minimalisticke riesenie issue #460. Admin ma moznost pridat lehotu a ta sa zobrazuje pri cakajucich krokoch a odpocitava od posledneho updatu.
Screenshot 2023-06-29 at 22 01 42

Pridal som aj farebne rozlisenie zelena > 5+, oranzova 0 - 5, cervena < 5. (Moze sa upravit alebo zmazat)

Screenshot 2023-06-29 at 21 59 47 Screenshot 2023-06-29 at 21 58 08

Closes #460

@xpavle00
Copy link
Collaborator Author

xpavle00 commented Jun 8, 2024

Changed stepper design:
Screenshot 2024-06-08 at 17 51 46
Screenshot 2024-06-08 at 17 54 16
Screenshot 2024-06-08 at 17 54 45
Screenshot 2024-06-08 at 17 55 20

@@ -19,7 +19,7 @@ def update

@current_step = @journey.steps.find_by(slug: params[:id])
@user_step = @user_journey.user_steps.find_or_initialize_by(step: @current_step)
@user_step.update(status: params['status'])
@user_step.update_status(new_status: params['status'])
Copy link
Member

Choose a reason for hiding this comment

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

preco tato zmena?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Asi tam bola este nejaka logika @crutch? Vratil som tam update.

app/models/step.rb Outdated Show resolved Hide resolved
app/models/user_step.rb Outdated Show resolved Hide resolved
@@ -18,6 +18,18 @@ def refresh_status
end
end

def update_status(new_status:)
update(status: new_status, submitted_at: new_status == 'waiting' ? Date.today : nil)
Copy link
Member

Choose a reason for hiding this comment

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

mozno lepsie tu dat waiting_until ako nejaky datum kedy to vyprsi (nebude potom treba tolko pocitat).

lebo pri nejakom podani ti mozu lehotu aj posunut - cize je to od pripadu k pripadu.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Zatial som to nechal tak, aby tam ostala informacia kedy to bolo podane, mozno sa na nieco hodi.

Comment on lines +29 to +31
Lehota vypršala pred: <strong class="govuk-tag govuk-tag--red"><%= format_past_days_count(-1 * remaining_time) %></strong>
<% else %>
Čakacia lehota: <strong class="govuk-tag govuk-tag--blue"><%= format_remaining_days_count(remaining_time) %></strong>
Copy link
Member

Choose a reason for hiding this comment

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

Toto by mal vidiet este nejaky dizajner.

app/controllers/steps_controller.rb Outdated Show resolved Hide resolved
</div>
<% elsif current_user_step.waiting? %>
<div class="govuk-body-s sdn-todo-list-main-action__info">
<h2 class="govuk-heading-s">Podanie bolo zaslané
Copy link
Member

Choose a reason for hiding this comment

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

Myslim, si ze tu treba lepsie "copy" lebo toto nemusi vzdy znamenat, ze to bolo podanie (aj ked vacsinou ano).

Zaroven sa mi zda ten navrh prilis vela textu a vela buttonov (velkych primarnych zelenych). Toto bude treba lepsie upratat. @xpavle00 ty si trufas aj na navrh toho ako by to malo vyzerat? (Staci sa pohrat s textami a govuk elementami)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Skusil som to zjednodusit. Prilozim screeny.

app/views/steps/_step_footer_logged_in.html.erb Outdated Show resolved Hide resolved
@jsuchal
Copy link
Member

jsuchal commented Jun 27, 2024

@xpavle00 chvilu mi trvalo kym som sa prekusal k tomuto, ale uz sa ti venujem.

@xpavle00
Copy link
Collaborator Author

xpavle00 commented Sep 1, 2024

Spracoval som pripomienky z PR co sa tyka kodu a zjednodusil ten panel ohladom podania:
image

Nastavovanie notifikacie som schoval aby nebolo matuce s viac main buttonmi:
image

Zrusenie notifikacie ma teraz cerveny button:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ako pouzivatel, chcem byt upozorneny na lehoty
3 participants