class CoachingAdminModel extends EICModel { organisations = [ { pic: '789654123', legalname: 'NightSHift.be', projects: [ { reference: 1, number: '965432187', type: 'project', acronym: 'Total Pepet 3000', organisation: 'ACME inc.', status: 'coach selected', creditsUsed: 3, creditsLeft: 3 } ] }, { pic: '896754312', legalname: 'ACME inc.', projects: [ { reference: 1, number: '965432187', type: 'project', acronym: 'Total Pepet 2000', organisation: 'ACME inc.', status: 'coach selected', creditsUsed: 3, creditsLeft: 3 }, { reference: 1, number: '965432187', type: 'project', acronym: 'MAXIBROUZOUF', organisation: 'ACME inc.', status: 'closed', creditsUsed: 3, creditsLeft: 3 } ] } ] /** * */ getCoachings() { return Promise.resolve([ { reference: 1, number: '987654321', type: 'proposal', acronym: 'MAXIBROUZOUF', organisation: 'ACME inc.', status: 'closed', creditsUsed: 6, creditsLeft: 0 }, { reference: 1, number: '965432187', type: 'project', acronym: 'Total Pepet 2000', organisation: 'ACME inc.', status: 'coach selected', creditsUsed: 3, creditsLeft: 3 } ]); } /** * */ getCoaching(number, id) { return Promise.resolve({ }); } /** * */ getCompanies() { return Promise.resolve(this.organisations); } /** * */ getOrganisation(pic) { return this.organisations.find(item => item.pic == pic); } /** * */ getCoaches() { return Promise.resolve([ { id: 12345, uid: 'fallimi', firstname: 'Michael', lastname: 'Fallise', email: 'michael.fallise@gmail.com', invitations: 2, coachings: 3 } ]); } /** * */ getCoach(id) { return Promise.resolve( { id: 12345, firstname: 'Michael', lastname: 'Fallise', email: 'michael.fallise@gmail.com', phone: '+32477708551', address: '', coachings: 3 } ); } } app.registerClass('CoachingAdminModel',CoachingAdminModel);