cac8b09263
Prevent dropping a task onto a bucket which has its limit reached Fix closing the dropdown Add notice to show the limit Add input to change kanban bucket limit Add menu item to save bucket limit Fix parsing dates from the api Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/234
29 lines
No EOL
761 B
JavaScript
29 lines
No EOL
761 B
JavaScript
import AbstractService from './abstractService'
|
|
import TeamMemberModel from '../models/teamMember'
|
|
import {formatISO} from 'date-fns'
|
|
|
|
export default class TeamMemberService extends AbstractService {
|
|
constructor() {
|
|
super({
|
|
create: '/teams/{teamId}/members',
|
|
delete: '/teams/{teamId}/members/{username}',
|
|
update: '/teams/{teamId}/members/{username}/admin',
|
|
})
|
|
}
|
|
|
|
processModel(model) {
|
|
model.created = formatISO(new Date(model.created))
|
|
model.updated = formatISO(new Date(model.updated))
|
|
return model
|
|
}
|
|
|
|
modelFactory(data) {
|
|
return new TeamMemberModel(data)
|
|
}
|
|
|
|
beforeCreate(model) {
|
|
model.userId = model.id // The api wants to get the user id as user_Id
|
|
model.admin = model.admin === null ? false : model.admin
|
|
return model
|
|
}
|
|
} |