/* Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de) Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) */ import AdapterBase from '../../../api/AdapterBase'; import ReactModalAdapterBase from "../../../api/ReactModalAdapterBase"; /** * SkillAdapter */ class SkillAdapter extends ReactModalAdapterBase { getDataMapping() { return [ 'id', 'name', 'description', ]; } getHeaders() { return [ { sTitle: 'ID', bVisible: false }, { sTitle: 'Name' }, { sTitle: 'Description' }, ]; } getFormFields() { return [ ['id', { label: 'ID', type: 'hidden' }], ['name', { label: 'Name', type: 'text' }], ['description', { label: 'Description', type: 'textarea', validation: '' }], ]; } getTableColumns() { return [ { title: 'Name', dataIndex: 'name', sorter: true, }, { title: 'Description', dataIndex: 'description', }, ]; } } /** * EducationAdapter */ class EducationAdapter extends ReactModalAdapterBase { getDataMapping() { return [ 'id', 'name', 'description', ]; } getHeaders() { return [ { sTitle: 'ID', bVisible: false }, { sTitle: 'Name' }, { sTitle: 'Description' }, ]; } getFormFields() { return [ ['id', { label: 'ID', type: 'hidden' }], ['name', { label: 'Name', type: 'text' }], ['description', { label: 'Description', type: 'textarea', validation: '' }], ]; } getTableColumns() { return [ { title: 'Name', dataIndex: 'name', sorter: true, }, { title: 'Description', dataIndex: 'description', }, ]; } } /** * CertificationAdapter */ class CertificationAdapter extends ReactModalAdapterBase { getDataMapping() { return [ 'id', 'name', 'description', ]; } getHeaders() { return [ { sTitle: 'ID', bVisible: false }, { sTitle: 'Name' }, { sTitle: 'Description' }, ]; } getFormFields() { return [ ['id', { label: 'ID', type: 'hidden' }], ['name', { label: 'Name', type: 'text' }], ['description', { label: 'Description', type: 'textarea', validation: '' }], ]; } getTableColumns() { return [ { title: 'Name', dataIndex: 'name', sorter: true, }, { title: 'Description', dataIndex: 'description', }, ]; } } /** * LanguageAdapter */ class LanguageAdapter extends ReactModalAdapterBase { getDataMapping() { return [ 'id', 'name', 'description', ]; } getHeaders() { return [ { sTitle: 'ID', bVisible: false }, { sTitle: 'Name' }, { sTitle: 'Description' }, ]; } getFormFields() { return [ ['id', { label: 'ID', type: 'hidden' }], ['name', { label: 'Name', type: 'text' }], ['description', { label: 'Description', type: 'textarea', validation: '' }], ]; } getTableColumns() { return [ { title: 'Name', dataIndex: 'name', sorter: true, }, { title: 'Description', dataIndex: 'description', }, ]; } } module.exports = { SkillAdapter, EducationAdapter, CertificationAdapter, LanguageAdapter, };