-
Notifications
You must be signed in to change notification settings - Fork 1
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: add admin panel and display teams #175
base: master
Are you sure you want to change the base?
Conversation
Link to: #128 |
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.
some remarks and questions
path: 'organisations', | ||
name: 'organisations', |
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.
path: 'organisations', | |
name: 'organisations', | |
path: 'organizations', | |
name: 'organizations', |
{ | ||
path: 'users', | ||
name: 'users', | ||
component: Dashboard, |
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.
component Dashboard for user ? typo or waiting for a future component ?
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.
For future admin and god user !
return { | ||
links: [ | ||
{ link: '', label: 'Dashboard' }, | ||
{ link: 'organisations', label: 'Organisations', isDisabled: true }, |
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.
{ link: 'organisations', label: 'Organisations', isDisabled: true }, | |
{ link: 'organizations', label: 'Organisations', isDisabled: true }, |
{ link: '', label: 'Dashboard' }, | ||
{ link: 'organisations', label: 'Organisations', isDisabled: true }, | ||
{ link: 'teams', label: 'Teams', isDisabled: false }, | ||
{ link: 'users', label: 'Users', isDisabled: true }, |
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.
do you think it is posible to reuse the array from router/admin.js to avoid rewriting this array ?
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.
Not sure and it will be different array for admin and god
components: { | ||
}, | ||
created(){ | ||
|
||
} |
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.
can we delete them ?
methods: { | ||
|
||
async getTeams() { | ||
const teams = await this.concatDocument(firebase.firestore().collection('teams').get()); |
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.
can we use the teams.service ?
this.teams = teams; | ||
}, | ||
async getOrganizations() { | ||
this.organizations = await this.concatDocument(firebase.firestore().collection('organizations').get()); |
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.
organization service ?
this.dialog = false | ||
this.$nextTick(() => { | ||
this.editedItem = Object.assign({}, this.defaultItem) | ||
this.editedId = null; |
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.
do we need editedId field if we already have editedItem (which hold the id too)?
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.
I reuse the vuetify way but yes this.editedItem.id should exist
save () { | ||
const orgaId = this.editedItem.organization.id || this.editedItem.organization; | ||
if (this.editedId) { | ||
delete this.editedItem.id; |
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.
why 'delete' and not this.editedItem.id = null ?
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.
Its for prevent to send the id to firebase
const orgaId = this.editedItem.organization.id || this.editedItem.organization; | ||
if (this.editedId) { | ||
delete this.editedItem.id; | ||
firebase.firestore().collection('teams') |
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.
can we use the teams service ?
Description
Using the new admin menu
We are able now to manage teams and add a new team !
Screenshot
GIF !