diff --git a/modules/worker/back/methods/worker/filter.js b/modules/worker/back/methods/worker/filter.js
new file mode 100644
index 000000000..cd644730a
--- /dev/null
+++ b/modules/worker/back/methods/worker/filter.js
@@ -0,0 +1,126 @@
+
+const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
+const buildFilter = require('vn-loopback/util/filter').buildFilter;
+const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
+
+module.exports = Self => {
+ Self.remoteMethodCtx('filter', {
+ description: 'Find all instances of the model matched by filter from the data source.',
+ accessType: 'READ',
+ accepts: [
+ {
+ arg: 'filter',
+ type: 'Object',
+ description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string',
+ http: {source: 'query'}
+ }, {
+ arg: 'tags',
+ type: ['Object'],
+ description: 'List of tags to filter with',
+ http: {source: 'query'}
+ }, {
+ arg: 'search',
+ type: 'String',
+ description: `If it's and integer searchs by id, otherwise it searchs by name`,
+ http: {source: 'query'}
+ }, {
+ arg: 'id',
+ type: 'Integer',
+ description: 'The worker id',
+ http: {source: 'query'}
+ }, {
+ arg: 'fi',
+ type: 'String',
+ description: 'The worker fi',
+ http: {source: 'query'}
+ }, {
+ arg: 'departmentFk',
+ type: 'Integer',
+ description: 'The worker department id',
+ http: {source: 'query'}
+ }, {
+ arg: 'extension',
+ type: 'Integer',
+ description: 'The worker extension id',
+ http: {source: 'query'}
+ }, {
+ arg: 'firstName',
+ type: 'String',
+ description: 'The worker firstName',
+ http: {source: 'query'}
+ }, {
+ arg: 'name',
+ type: 'String',
+ description: 'The worker name',
+ http: {source: 'query'}
+ }, {
+ arg: 'nickname',
+ type: 'String',
+ description: 'The worker name',
+ http: {source: 'query'}
+ }
+ ],
+ returns: {
+ type: ['Object'],
+ root: true
+ },
+ http: {
+ path: `/filter`,
+ verb: 'GET'
+ }
+ });
+
+ Self.filter = async(ctx, filter) => {
+ let conn = Self.dataSource.connector;
+
+ let where = buildFilter(ctx.args, (param, value) => {
+ switch (param) {
+ case 'search':
+ return /^\d+$/.test(value)
+ ? {'w.id': value}
+ : {or: [
+ {'w.firstName': {like: `%${value}%`}},
+ {'w.name': {like: `%${value}%`}}
+ ]};
+ case 'id':
+ return {'w.id': value};
+ case 'name':
+ return {'w.name': {like: `%${value}%`}};
+ case 'firstName':
+ return {'w.firstName': {like: `%${value}%`}};
+ case 'extension':
+ return {'p.extension': value};
+ case 'fi':
+ return {'c.fi': value};
+ case 'departmentFk':
+ return {'d.id': value};
+ case 'userName':
+ return {'u.name': {like: `%${value}%`}};
+ }
+ });
+
+ filter = mergeFilters(ctx.args.filter, {where});
+
+ let stmts = [];
+ let stmt;
+
+ stmt = new ParameterizedSQL(
+ `SELECT w.id, u.email, p.extension, u.name as userName,
+ d.name AS department, w.name, u.nickname
+ FROM worker w
+ LEFT JOIN workerDepartment wd ON wd.workerFk = w.id
+ LEFT JOIN department d ON d.id = wd.departmentFk
+ LEFT JOIN client c ON c.id = w.userFk
+ LEFT JOIN account.user u ON u.id = w.userFk
+ LEFT JOIN pbx.sip p ON p.user_id = u.id`
+ );
+
+
+ stmt.merge(conn.makeSuffix(filter));
+ let itemsIndex = stmts.push(stmt) - 1;
+
+ let sql = ParameterizedSQL.join(stmts, ';');
+ let result = await conn.executeStmt(sql);
+ return itemsIndex === 0 ? result : result[itemsIndex];
+ };
+};
diff --git a/modules/worker/back/models/worker.js b/modules/worker/back/models/worker.js
new file mode 100644
index 000000000..91939c66f
--- /dev/null
+++ b/modules/worker/back/models/worker.js
@@ -0,0 +1,3 @@
+module.exports = Self => {
+ require('../methods/worker/filter')(Self);
+};
diff --git a/modules/worker/front/index/index.html b/modules/worker/front/index/index.html
index 0da3d89c9..6f679b3e9 100644
--- a/modules/worker/front/index/index.html
+++ b/modules/worker/front/index/index.html
@@ -1,8 +1,8 @@