Split clients and projects modules
This commit is contained in:
1 parent
854e1038c6
commit
0f7530024e
8 files changed
+181
-1
No files matched your search
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
!function e(t,a,l){function i(o,r){if(!a[o]){if(!t[o]){var s="function"==typeof require&&require;if(!r&&s)return s(o,!0);if(n)return n(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=a[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,a,l)}return a[o].exports}for(var n="function"==typeof require&&require,o=0;o<l.length;o++)i(l[o]);return i}({1:[function(e,t,a){"use strict";var l=e("./lib");window.ClientAdapter=l.ClientAdapter},{"./lib":2}],2:[function(e,t,a){"use strict";var l;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var a=0;a<t.length;a++){var l=t[a];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,l=u(e);if(t){var i=u(this).constructor;a=Reflect.construct(l,arguments,i)}else a=l.apply(this,arguments);return c(this,a)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}(c,e);var t,a,l,i=s(c);function c(){return n(this,c),i.apply(this,arguments)}return t=c,(a=[{key:"getDataMapping",value:function(){return["id","name","details","address","contact_number"]}},{key:"getHeaders",value:function(){return[{sTitle:"ID",bVisible:!1},{sTitle:"Name"},{sTitle:"Details"},{sTitle:"Address"},{sTitle:"Contact Number"}]}},{key:"getFormFields",value:function(){return this.showSave?[["id",{label:"ID",type:"hidden"}],["name",{label:"Name",type:"text"}],["details",{label:"Details",type:"textarea",validation:"none"}],["address",{label:"Address",type:"textarea",validation:"none"}],["contact_number",{label:"Contact Number",type:"text",validation:"none"}],["contact_email",{label:"Contact Email",type:"text",validation:"none"}],["company_url",{label:"Company Url",type:"text",validation:"none"}],["status",{label:"Status",type:"select",source:[["Active","Active"],["Inactive","Inactive"]]}],["first_contact_date",{label:"First Contact Date",type:"date",validation:"none"}]]:[["id",{label:"ID",type:"hidden"}],["name",{label:"Name",type:"placeholder"}],["details",{label:"Details",type:"placeholder",validation:"none"}],["address",{label:"Address",type:"placeholder",validation:"none"}],["contact_number",{label:"Contact Number",type:"placeholder",validation:"none"}],["contact_email",{label:"Contact Email",type:"placeholder",validation:"none"}],["company_url",{label:"Company Url",type:"placeholder",validation:"none"}],["status",{label:"Status",type:"placeholder",source:[["Active","Active"],["Inactive","Inactive"]]}],["first_contact_date",{label:"First Contact Date",type:"placeholder",validation:"none"}]]}},{key:"getHelpLink",value:function(){return"http://blog.icehrm.com/docs/projects/"}}])&&o(t.prototype,a),l&&o(t,l),c}(((l=e("../../../api/AdapterBase"))&&l.__esModule?l:{default:l}).default);t.exports={ClientAdapter:d}},{"../../../api/AdapterBase":4}],3:[function(e,t,a){"use strict";function l(e,t){for(var a=0;a<t.length;a++){var l=t[a];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,a,i;return t=e,(a=[{key:"getKey",value:function(e,t){var a="".concat(e,"|");for(var l in t)a+="".concat(l,"=").concat(t[l],"|");return a}},{key:"invalidateTable",value:function(e){for(var t,a=0;a<localStorage.length;a++)(t=localStorage.key(a)).indexOf("t=".concat(e))>0&&localStorage.removeItem(t)}},{key:"getData",value:function(e){var t;if("undefined"==typeof Storage)return null;var a=localStorage.getItem(e);return void 0!==a&&null!=a&&""!==a?void 0===(t=JSON.parse(a))||null==t||void 0!==t.status&&null!=t.status&&"SUCCESS"!==t.status?null:t:null}},{key:"setData",value:functioLine truncated
|
||||
//# sourceMappingURL=clients.js.map
|
||||
@@ -0,0 +1,5 @@
|
||||
import {
|
||||
ClientAdapter,
|
||||
} from './lib';
|
||||
|
||||
window.ClientAdapter = ClientAdapter;
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
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';
|
||||
|
||||
/**
|
||||
* ClientAdapter
|
||||
*/
|
||||
|
||||
class ClientAdapter extends AdapterBase {
|
||||
getDataMapping() {
|
||||
return [
|
||||
'id',
|
||||
'name',
|
||||
'details',
|
||||
'address',
|
||||
'contact_number',
|
||||
];
|
||||
}
|
||||
|
||||
getHeaders() {
|
||||
return [
|
||||
{ sTitle: 'ID', bVisible: false },
|
||||
{ sTitle: 'Name' },
|
||||
{ sTitle: 'Details' },
|
||||
{ sTitle: 'Address' },
|
||||
{ sTitle: 'Contact Number' },
|
||||
];
|
||||
}
|
||||
|
||||
getFormFields() {
|
||||
if (this.showSave) {
|
||||
return [
|
||||
['id', { label: 'ID', type: 'hidden' }],
|
||||
['name', { label: 'Name', type: 'text' }],
|
||||
['details', { label: 'Details', type: 'textarea', validation: 'none' }],
|
||||
['address', { label: 'Address', type: 'textarea', validation: 'none' }],
|
||||
['contact_number', { label: 'Contact Number', type: 'text', validation: 'none' }],
|
||||
['contact_email', { label: 'Contact Email', type: 'text', validation: 'none' }],
|
||||
['company_url', { label: 'Company Url', type: 'text', validation: 'none' }],
|
||||
['status', { label: 'Status', type: 'select', source: [['Active', 'Active'], ['Inactive', 'Inactive']] }],
|
||||
['first_contact_date', { label: 'First Contact Date', type: 'date', validation: 'none' }],
|
||||
];
|
||||
}
|
||||
return [
|
||||
['id', { label: 'ID', type: 'hidden' }],
|
||||
['name', { label: 'Name', type: 'placeholder' }],
|
||||
['details', { label: 'Details', type: 'placeholder', validation: 'none' }],
|
||||
['address', { label: 'Address', type: 'placeholder', validation: 'none' }],
|
||||
['contact_number', { label: 'Contact Number', type: 'placeholder', validation: 'none' }],
|
||||
['contact_email', { label: 'Contact Email', type: 'placeholder', validation: 'none' }],
|
||||
['company_url', { label: 'Company Url', type: 'placeholder', validation: 'none' }],
|
||||
['status', { label: 'Status', type: 'placeholder', source: [['Active', 'Active'], ['Inactive', 'Inactive']] }],
|
||||
['first_contact_date', { label: 'First Contact Date', type: 'placeholder', validation: 'none' }],
|
||||
];
|
||||
}
|
||||
|
||||
getHelpLink() {
|
||||
return 'http://blog.icehrm.com/docs/projects/';
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
ClientAdapter,
|
||||
};
|
||||
Reference in new issue
Block a user