sledilnik / zdravniki

Website for showing doctors' availability in Slovenia - https://zdravniki.sledilnik.org/
https://zdravniki.sledilnik.org
8 stars 8 forks source link

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

Closed jalezi closed 8 months ago

jalezi commented 8 months ago

Adds confirmation dialog before a user sends an error report.

Screenshot 2024-02-26 at 09 20 43

@SterArcher please check translations.

FIX: #447

jalezi commented 8 months ago

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 commented 8 months ago

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

jalezi commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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

I refactored quite a lot. Added some functionality:

Some translations are needed.