-
Notifications
You must be signed in to change notification settings - Fork 21
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
add auth store #119
add auth store #119
Conversation
b431741
to
a2b0059
Compare
import { type User } from '~/interfaces/User' | ||
import { type SelfInfo } from './auth.type' | ||
|
||
export const transformSelfInfoFromApi = (userInfo: any): { info: SelfInfo, user: User } => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
userInfo: any
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are getting this from API, I don't think we can know the type of userInfo here.
Let me know, if I'm not getting it right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add types for now once api is integrated you shall be able to fixes if some types are breaking
* setup initial server * setup goals backend * add gitignore in backend * Add changes for deploying backend (#61) * update settings and requirements file for deploy config * update gitignore * add static files * update settings allowed hosts * add example env file * Add docs for deploying backend * Revert "add static files" This reverts commit 727dc65. * Update docs readme * Update docs readme * Backend/congif setup (#60) * feature/added-getting env from config file * chor: added default.env and gitignored .env * chore: update requirement.txt * chore: added new line * chore: move comment * chore: add secret_key in sample-local.py * chore: add secret_key in development.py * Fix/get django env from .env (#75) * feature/added-getting env from config file * chor: added default.env and gitignored .env * chore: update requirement.txt * chore: added new line * chore: move comment * chore: add secret_key in sample-local.py * chore: add secret_key in development.py * fix: get django_env form .env in manage.py to set django_settings_module * chore: get debug from env * chore: get secret from env in development * Feature/set create at datetime default (#76) * chore: add datetime by default while data is being create * chore: removed unwanted import * UI revamp (#72) * remove old goal site * setup goal store and goal tab form * add user store and change goal tab * change stlye and different component for goal add and view * changes add vitest throw error on unable to find goal Id add unit test for goals store fix multiple /members call * test add sinon add goals store action tests add users store tests * DOCS: Add description about the website in repo (#83) * Assignee popup and add Vuetify (#82) * remove old goal site * setup goal store and goal tab form * add user store and change goal tab * change stlye and different component for goal add and view * changes add vitest throw error on unable to find goal Id add unit test for goals store fix multiple /members call * test add sinon add goals store action tests add users store tests * add pop up assignee * intial setup for the new flow (#84) * intial setup for the new flow * switched to default permission class * tests added * changes requested by @pallabez * test written for goals app (#86) * Data layer setup with axios and jsonapi-vuex (#92) * add axios * add jsonapi-vuex * add fetch all goal action (#96) * Bump http-cache-semantics from 4.1.0 to 4.1.1 in /website (#95) Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump django from 4.0.7 to 4.0.9 in /api (#94) Bumps [django](https://github.com/django/django) from 4.0.7 to 4.0.9. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@4.0.7...4.0.9) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ua-parser-js from 0.7.31 to 0.7.33 in /website (#91) Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33. - [Release notes](https://github.com/faisalman/ua-parser-js/releases) - [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md) - [Commits](faisalman/ua-parser-js@0.7.31...0.7.33) --- updated-dependencies: - dependency-name: ua-parser-js dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump json5 from 1.0.1 to 1.0.2 in /website (#89) Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump decode-uri-component from 0.2.0 to 0.2.2 in /website (#81) Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump loader-utils from 1.4.0 to 1.4.2 in /website (#78) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: nuxtjs/sentry module added (#98) * feat: nuxtjs/sentry module added * refactor: removed unnecessary changes * feat: added sentry/tracing * restructure website (#101) * Feat/goal form modal (#102) * add components for form * refactor and add SUBMIT button * replace components with vuetify components * form modal added * design change of form * refactor and add reusable close button * remove reusable components and some input and select fields * added scoped in style tag * added validation * refactor * fix merge conflicts --------- Co-authored-by: SahsiSunny <[email protected]> * Migration/nuxt 3 (#103) * migration nuxt 2 to nuxt 3 * add pinia orm * add components and contants * render pages & layouts * fix layout error * fix vuetify setup * fix popup vuetify error * add old readme * setup vitest (#105) * Setup users data (#106) * add scaffold for users data * add fetch user adapter * add user store * Add goals data layer (#108) * add scaffold for users data * add fetch user adapter * add user store * add goal and UserGoal model & established relationship between them * add goal adapters and interfaces * add goal store * fix goal store conflicting with user store * Fix eslint (#109) * fix eslint and linted * fix linting errors * fix eslint errors in components (#110) * fix eslint errors in components * fix script error * Fix form modal (#111) * fix eslint errors in components * fix script error * remove form folder * fix form modal * Feature/layout (#112) * fix eslint errors in components * fix script error * remove form folder * fix form modal * global css changes * add AppSideBar and renamed navbar * fix icon not working * fix navbar * add theme and font * hotfix: fix window error and lint * upgraded all packages (#121) * add auth store (#119) * add auth store * handle api response * remove unnecessary comment * add apis constant * remove test file * handle auth error * Feature/goal add (#123) * add goal integration * use constant for api replace backend staging constant fix constant * lint change * add goalTabPost toggle button and ux improvement * remove unncessary element and lint fix * hotfix: api field changes * upgrade all packages and pin node & yarn version (#126) Co-authored-by: Kuro <[email protected]> * Restructure/models (#127) * upgrade all packages and pin node & yarn version * change model * change interface * change adapter * change goal store --------- Co-authored-by: Kuro <[email protected]> * add goal list (#131) Co-authored-by: kuro <[email protected]> * feat: msw setup * add coverage report * revert lint changes * check for goalId * Setup PR template #134 (#139) created .github folder created pull_request_template.md file in .github folder with given content * updated table design --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Shubham Yadav <[email protected]> Co-authored-by: Prakash Choudhary <[email protected]> Co-authored-by: Samyak Shah <[email protected]> Co-authored-by: Vinayak Goyal <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: shubhambajaj <[email protected]> Co-authored-by: SahsiSunny <[email protected]> Co-authored-by: Kuro <[email protected]> Co-authored-by: bhtibrewal <[email protected]> Co-authored-by: Amit Prakash <[email protected]> Co-authored-by: Suhas <[email protected]>
Partially fixes - #73