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

[Feature] [#142] 3ème dose #143

Closed
wants to merge 1 commit into from
Closed

[Feature] [#142] 3ème dose #143

wants to merge 1 commit into from

Conversation

pylapp
Copy link
Contributor

@pylapp pylapp commented Nov 30, 2021

Description

Implementation of 3rd shot in the app.

Changes / Definition of done

  • Remove any objects related to Chronodose (configuration, UI, wording)
  • Update business objects to manage daily slots
  • Update API to request for daily slots
  • Requests for data
  • Filter available slots by day (total is always displayed, or nothing)
  • Implement filtering to get vaccination centers with 3rd shot
  • Update GUI to display vaccination centers with 3rd shot
  • Make review of a11y (Voice Over, dynamic fonts)
  • Add SPDX headers in source files
  • Remove objects related to "appointment_schedules"? Seems not used anymore.
  • If no slots available, say it or don't display (cf. web front)

Related issue

Link to the Github issue #142
Link to the Github issue #150

What I tested

  • Display of booster shot in UI
  • Compared results with web front

Regression risks

Nothing identified

Screenshots

Before After
IMG_9526 IMG_9525

Checklist

  • I have installed SwiftLint and made sure code formatting is correct
  • I have performed a self-review of my own code
  • I tested my changes on real device
  • My changes generate no new warnings
  • I have commented my code in hard-to-understand areas
  • Any dependent changes have been merged into develop
  • I have checked there aren't other open Pull Requests for the same update/change

@pylapp pylapp mentioned this pull request Nov 30, 2021
@pylapp pylapp changed the title WIP: [Feature] [#492] 3ème dose WIP: [Feature] [#142] 3ème dose Dec 1, 2021
@victor-sarda victor-sarda marked this pull request as draft December 1, 2021 18:47
@pylapp pylapp changed the title WIP: [Feature] [#142] 3ème dose [Feature] [#142] 3ème dose Dec 2, 2021
@pylapp pylapp marked this pull request as ready for review December 2, 2021 12:37
@pylapp
Copy link
Contributor Author

pylapp commented Dec 2, 2021

@victor-sarda Ready for review!

@rozierguillaume
Copy link
Contributor

😍

…n business objects

For issue #142:
- Remove Chronodose-related items
- Update GUI with segmented control
- Tests a11y (dynamic fonts, Voice Over)
- Update model to get daily slots from JSON
- Request API to populate model
- Code decoration with Xcode minimap mark and SPDX headers in modified sources
- Add mock data (raw JSON files) and a HOWTO to set up an environment with mock data

For issue #150:
- Refactor business objects so as to remove the "appointment count" field in VaccinationCentre objects

Signed-off-by: Pierre-Yves Lapersonne <dev@pylapersonne.info>
@pylapp
Copy link
Contributor Author

pylapp commented Dec 3, 2021

@victor-sarda It's ready (again) for review. I made also a refactor so as to remove a field backend wanted to delete.

@@ -0,0 +1,59 @@
# FAQ

## Mettre en place un serveur local pour jouer avec des données
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Mettre en place un serveur local pour jouer avec des données comme si renvoyées par le backend"

</body>
</html>
```
5. Via un navigateur web, saisir l'URL du site web, ici **http://w.x.y.z:8888**. Un page avec le texte _Youpi !_ doit être affichée ; sinon il y a vraisemblablement un problème de configuration de votre serveur web.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typo : "Une"

1. Aller sur [le site web de production](https://vitemadose.covidtracker.fr/)
2. Ouvrir la console web du navigateur que vous utilisez
2. Saisir _14000_ et sélectionner _14000 - Caen_
3. Récupérer (via un onglet supposément nommé _Network_ par exemple) le contenu des fichiers _14.json_ qui aura les infos des centres de vaccination, ainsi que le fichier _creneaux-quotidiens.json_. S'assurer de prendre celui du bon département (URL de la forme _https://vitemadose.gitlab.io/vitemadose/14/creneaux-quotidiens.json_). Récupérer aussi le fichier _stats.json_ et le fichier _departements.json_ (par exemple via l'URL _https://vitemadose.gitlab.io/vitemadose/departements.json_)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Récupérer via la console du navigateur"

- dans _stats.json_, pour l'objet **tout_departement**, remplacer la valeur du champ "disponibles" par des nombres reconnaissables
- dans le fichier _14.json_, changer le nom d'un centre de vaccination

Si toutefois, malgré tout ceci, vous pensez récupérer des données depuis le site web de production, il est possible que la configuration à distance (via _Firebase_) ait pris la main et écrasé la configuration par défaut renseignée dans le fichier _remote-config.plist_. Auquel cas, y aller plus brutalement en remplaçant la valeur retournée par la propriété calculée `baseUrl` dans l'extension de `RemoteConfiguration` par l'adresse IP du serveur local, comme :
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Espace en trop

INFOPLIST_FILE = ViteMaDose/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = app.vitemadose.debug;
PRODUCT_BUNDLE_IDENTIFIER = pylapp.vitemadose.ios;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oups


/// Returns the slots for the given day.
/// - Parameter day: The date to use for filtering
/// - Returns: Aerray of `DailySlot`, can be empty if nothing found for this `day`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typo: "Array"


public struct Slot: Codable {

/// Code for the booking platform related to the location when there are slots (e.g. "mesoigner3031" ot "doctolib203443pid88863")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typo: "where"

numberOfBoosterShotsSlots() > 0
}

/// - Returns: The number of third shot / booster shot this slot have
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typo: "shots"

return slotsNumber
}

/// - Returns: The global number of shots this slot have
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typo: "has"

/// Returns if there is some `Slot` with booster shots for the given `VaccinationCentre` in this `DatedSlotsForCentres`.
/// - Parameter centre: The centre to look for booster shots
/// - Returns: False if there is no centre stored in this `DatedSlotsForCentres` or if there is no booster shot, true if there are booster shots for this centre.
func hasBoosterShot(for centre: VaccinationCentre) -> Bool {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rename to "hasBoosterShots"

@pylapp
Copy link
Contributor Author

pylapp commented Dec 3, 2021

Duplicated in #152, should be closed once comments here have been processed.

@pylapp
Copy link
Contributor Author

pylapp commented Dec 6, 2021

See specific branch with copy-pasted evolutions in: https://github.com/CovidTrackerFr/vitemadose-ios/commits/feature/142_third-dose

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.

None yet

2 participants