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

Refactor: Frontend modified to adapt to api change, Authentication flow change, Add card to PDF feature, and CI/CD updates #20

Merged
merged 9 commits into from
Nov 6, 2024

Conversation

mustafasaifee42
Copy link
Contributor

@mustafasaifee42 mustafasaifee42 commented Nov 6, 2024

What's New?

This change introduces an update to API calls, Authentication flow, Card export feature, and CI/CD updates.

  • All API calls are now centralized in parameterized functions.
  • Authentication is now delegated via local storage and refreshed in Axios Interceptor middleware
  • CI/CD is changed to hookup production and staging frontend with production and staging API
  • Supports exporting of Signals/Trend Cards into a PDF document.
  • Minor refactors, code improvement, and fixes to edge case error boundaries

mykolaskrynnyk and others added 9 commits October 16, 2024 10:36
* Feat(util): handler now contains singing out and refreshing mechanisms

* Feat(api): centralized all api calls to /api dir

* Feat(lib): added qs library for query string configuration

* Feat(types): added required types for new api calls

* Feat(App): replaced and refactored api calls to centralized functions

* Chore(Constants): cleaned up constants to use vite setup

* Refactor(MainBody): refactored api calls to centralized functions

* Refactor(HomePage): refactored api calls and choice type definition

* Refactor(AdminPanel): replaced api calls with centralized functions

* Refactor(MyDrafts): replaced api calls with centralized functions

* Fix(SignalCardPage): added error handling

* Refactor(TrendEntryFormEl): replaced api calls to centralized functions and updated choice types

* Refactor(SignalEntryFormEl): replaced api calls with centralized functions and updated choice types

* Refactor(components): updated choices objects according to new type definition

* Refactor(AddSingalsModal): replaced api calls with centralized calls and updated choice types

* Refactor(AddTrendsModal): replaced api calls to centralized function calls and updated choice types

* Refactor(SingOutButton): replaced api call to centralized function calls and updated choice types

* Refactor(SignUpButton): replaced api calls to centralized function calls

* Refactor(AllSignals): replaced api calls to centralized function calls

* Refactor(EditSignal): replaced api call to centralized function call

* Refactor(SignalDetail): replaced api calls to centralized function calls and updated choice types

* Refactor(AllTrends): replaced api calls to centralized function calls

* Refactor(EditTrend): replaced api call to centralized function call

* Refactor(TrendDetail): replaced api calls to centralized function calls and updated choice types

* Feat(asset): added hero image for easier relative import

* Refactor(auth): cleaned up authentication flow via use of interceptor

* Fix(Types): added missing attributes to types

* Fix(MainBody): added missing attributes to api function call

* Fix(PdfPageDesign): improved error handling for edge cases

* Fix(EntryForms): added required parameters to api function calls

* Fix(EditSignal/Trend): read using read endpoints instead of search endpoints

* Fix(AllSignals/Trends): added proper status to filter for search

* Refactor(minor): moved platform config to public folder

* Fix(constants): refactored constants for consistency

* Refactor(AuthConfig): renamed and refactored for consistency and readability

* Fix(types): added created by attribute to fix updating params

* Fix(api_config): increased timeout for image uploads and refactored auth process

* Feat(App): logs out automatically if token is expired

* Fix(main): minor import fix

* Fix(addModals): added essential params

* Fix(minor): import naming change

* Fix(entryFormEl): added proper params for update and image display

* Refactor(ci/cd): removed unused env variables and added new conditional variables for different branches

* Refactor(CI/CD): improved conditional env variables
* Feat(util): handler now contains singing out and refreshing mechanisms

* Feat(api): centralized all api calls to /api dir

* Feat(lib): added qs library for query string configuration

* Feat(types): added required types for new api calls

* Feat(App): replaced and refactored api calls to centralized functions

* Chore(Constants): cleaned up constants to use vite setup

* Refactor(MainBody): refactored api calls to centralized functions

* Refactor(HomePage): refactored api calls and choice type definition

* Refactor(AdminPanel): replaced api calls with centralized functions

* Refactor(MyDrafts): replaced api calls with centralized functions

* Fix(SignalCardPage): added error handling

* Refactor(TrendEntryFormEl): replaced api calls to centralized functions and updated choice types

* Refactor(SignalEntryFormEl): replaced api calls with centralized functions and updated choice types

* Refactor(components): updated choices objects according to new type definition

* Refactor(AddSingalsModal): replaced api calls with centralized calls and updated choice types

* Refactor(AddTrendsModal): replaced api calls to centralized function calls and updated choice types

* Refactor(SingOutButton): replaced api call to centralized function calls and updated choice types

* Refactor(SignUpButton): replaced api calls to centralized function calls

* Refactor(AllSignals): replaced api calls to centralized function calls

* Refactor(EditSignal): replaced api call to centralized function call

* Refactor(SignalDetail): replaced api calls to centralized function calls and updated choice types

* Refactor(AllTrends): replaced api calls to centralized function calls

* Refactor(EditTrend): replaced api call to centralized function call

* Refactor(TrendDetail): replaced api calls to centralized function calls and updated choice types

* Feat(asset): added hero image for easier relative import

* Refactor(auth): cleaned up authentication flow via use of interceptor

* Fix(Types): added missing attributes to types

* Fix(MainBody): added missing attributes to api function call

* Fix(PdfPageDesign): improved error handling for edge cases

* Fix(EntryForms): added required parameters to api function calls

* Fix(EditSignal/Trend): read using read endpoints instead of search endpoints

* Fix(AllSignals/Trends): added proper status to filter for search

* Refactor(minor): moved platform config to public folder

* Fix(constants): refactored constants for consistency

* Refactor(AuthConfig): renamed and refactored for consistency and readability

* Fix(types): added created by attribute to fix updating params

* Fix(api_config): increased timeout for image uploads and refactored auth process

* Feat(App): logs out automatically if token is expired

* Fix(main): minor import fix

* Fix(addModals): added essential params

* Fix(minor): import naming change

* Fix(entryFormEl): added proper params for update and image display

* Refactor(ci/cd): removed unused env variables and added new conditional variables for different branches

* Refactor(CI/CD): improved conditional env variables

* Fix(types): added created_for in signal create/update types

* Fix(api): export endpoints response type set to blob for incoming binary data

* Fix(entryForm): added missing types in update and create

* Fix(entryFormEls): added missing params
* Fix(SignalEntryForm): added missing attributes for updating signal

* Fix(api_config): automatic localStorage clearing if interceptor fails to refresh token

* Refactor(errors): error handling message restructured to fit new response
@GedionT GedionT changed the title Staging Refactor: frontend modified to adapt to api change, authentication flow fix, and ci/cd change Nov 6, 2024
@GedionT GedionT self-assigned this Nov 6, 2024
@mykolaskrynnyk mykolaskrynnyk added bug Something isn't working enhancement New feature or request labels Nov 6, 2024
@GedionT GedionT changed the title Refactor: frontend modified to adapt to api change, authentication flow fix, and ci/cd change Refactor: Frontend modified to adapt to api change, Authentication flow change, Add card to PDF feature, and CI/CD updates Nov 6, 2024
@GedionT GedionT assigned GedionT and mykolaskrynnyk and unassigned GedionT Nov 6, 2024
@mykolaskrynnyk mykolaskrynnyk merged commit 6047395 into production Nov 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants