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

feat: 🚸 adds confirmation dialog before user sends error report #449

Merged
merged 11 commits into from
Feb 29, 2024

Conversation

jalezi
Copy link
Collaborator

@jalezi jalezi commented Feb 26, 2024

Adds confirmation dialog before a user sends an error report.

Screenshot 2024-02-26 at 09 20 43

@SterArcher please check translations.

FIX: #447

src/locales/sl.json Outdated Show resolved Hide resolved
src/locales/en.json Outdated Show resolved Hide resolved
src/locales/it.json Outdated Show resolved Hide resolved
jalezi and others added 2 commits February 26, 2024 15:35
Co-authored-by: Štefan Baebler <stefan.baebler@gmail.com>
Until proper translation we eill display in English.
src/locales/it.json Outdated Show resolved Hide resolved
Co-authored-by: Štefan Baebler <stefan.baebler@gmail.com>
Co-authored-by: Štefan Baebler <stefan.baebler@gmail.com>
Copy link
Member

@stefanb stefanb left a comment

Choose a reason for hiding this comment

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

Tested by confirming 2 doctor changes and all the fields except timestamp came empty to the gsheet, including the basic data and the note that i wrote:
image

@jalezi
Copy link
Collaborator Author

jalezi commented Feb 28, 2024

Tested by confirming 2 doctor changes and all the fields except timestamp came empty to the gsheet, including the basic data and the note that i wrote: image

@stefanb give link me to gsheet. It should work. env vars?

{
    "inputName": {
        "id": "1889437249",
        "value": "Ahačič Srednik Nika"
    },
    "inputUrl": {
        "id": "1318563412",
        "value": "http://localhost:3000/sl/gp/ahacic-srednik-nika/141819"
    },
    "inputType": {
        "id": "2146648493",
        "value": "gp"
    },
    "inputInstId": {
        "id": "",
        "value": "141819"
    },
    "inputProvider": {
        "id": "480165709",
        "value": "ZDRAVSTVENI DOM OSNOVNO VARSTVO NOVA GORICA"
    },
    "inputFullAddress": {
        "id": "1560677043",
        "value": "Rejčeva ulica 4, 5000 Nova Gorica"
    },
    "inputAccepts": {
        "id": "1569335568",
        "value": "n"
    },
    "inputAvailability": {
        "id": "77408979",
        "value": "100 %"
    },
    "inputWebsite": {
        "id": "1504147301",
        "value": "http://www.zd-go.si"
    },
    "inputPhone": {
        "id": "1724437941",
        "value": "041345678"
    },
    "inputEmail": {
        "id": "",
        "value": "example@example.com"
    },
    "inputOrderform": {
        "id": "",
        "value": "example.com"
    },
    "inputNote": {
        "id": "1714314704",
        "value": "test - jaka"
    }
}

Hmm, two inputs are without id.
I'm so stupid 😬.

we have different env variables in .env.*. not sure which are correct.

@stefanb
Copy link
Member

stefanb commented Feb 28, 2024

I was looking at production gsheet, but it is interesting, that the timestamp made it there, but nothing else.

@jalezi
Copy link
Collaborator Author

jalezi commented Feb 28, 2024

I was looking at production gsheet, but it is interesting, that the timestamp made it there, but nothing else

My bad, I made a rookie mistake. 😥

@SterArcher
Copy link
Contributor

I have checked the translation I would change it to say:
“Sporocanje napak ni namenjeno narocanju na pregled ali opredelitev pri zdravniku. Za narocanje se obrnite na izbranega zdravnika preko prikazanih komunikacijskih kanalov.”

This all looks great, thanks!

@jalezi jalezi requested a review from stefanb February 29, 2024 15:41
@jalezi
Copy link
Collaborator Author

jalezi commented Feb 29, 2024

Sorry, @stefanb and @SterArcher I recognized very late that posting a form is working. 😁

I refactored quite a lot. Added some functionality:

  • The address field is required;
  • A little bit better message alerts (error or no field has changed);
  • The user can now reset the form without closing the form.
  • The inputs have labels (only for screen readers)

Some translations are needed.

Copy link
Member

@stefanb stefanb left a comment

Choose a reason for hiding this comment

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

LGTM!

@stefanb stefanb merged commit 4dc0300 into master Feb 29, 2024
3 checks passed
@stefanb stefanb deleted the feat-jalezi/confirmation-dialog branch February 29, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prompt to warn user when submitting an error in data
3 participants