diff --git a/UPGRADING.md b/UPGRADING.md index cbe20b8a..f340c1d1 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -13,6 +13,7 @@ Perform EACH version specific task between your version and the new one, otherwi ### Possible BC breaks - Refactored toolbars and search, plugins needs to be checked +- Added `manage_tag` permission for new tag features - Invoices now supports multiple repositories, some method signatures had to be changed (eg. `calculateSumIdentifier()`) ## [1.2](https://github.com/kevinpapst/kimai2/releases/tag/1.2) diff --git a/assets/js/plugins/KimaiAutocomplete.js b/assets/js/plugins/KimaiAutocomplete.js index 77ec6a67..31a6937e 100644 --- a/assets/js/plugins/KimaiAutocomplete.js +++ b/assets/js/plugins/KimaiAutocomplete.js @@ -20,6 +20,7 @@ export default class KimaiAutocomplete extends KimaiPlugin { } init() { + this.minChars = this.getContainer().getConfiguration().get('autoComplete'); this.activateAutocomplete(this.selector); } @@ -59,7 +60,7 @@ export default class KimaiAutocomplete extends KimaiPlugin { search: function () { // custom minLength var term = self.extractLastTag(this.value); - if (term.length < 2) { + if (term.length < self.minChars) { return false; } }, diff --git a/config/packages/kimai.yaml b/config/packages/kimai.yaml index 63b471bf..b7cd1baa 100644 --- a/config/packages/kimai.yaml +++ b/config/packages/kimai.yaml @@ -95,7 +95,7 @@ kimai: TIMESHEET_OTHER: ['view_other_timesheet','start_other_timesheet','stop_other_timesheet','create_other_timesheet','edit_other_timesheet','export_other_timesheet','delete_other_timesheet'] PROFILE: ['view_own_profile','edit_own_profile','password_own_profile','preferences_own_profile','api-token_own_profile'] PROFILE_OTHER: ['view_other_profile','edit_other_profile','delete_other_profile','password_other_profile','roles_other_profile','preferences_other_profile','api-token_other_profile','teams_other_profile'] - TAGS: ['view_tag','delete_tag'] + TAGS: ['view_tag','manage_tag','delete_tag'] USER: ['view_user','create_user','delete_user','role_permissions'] RATE: ['view_rate_own_timesheet','edit_rate_own_timesheet'] RATE_OTHER: ['view_rate_other_timesheet','edit_rate_other_timesheet'] diff --git a/config/packages/nelmio_api_doc.yaml b/config/packages/nelmio_api_doc.yaml index aa0f7584..ceebe973 100644 --- a/config/packages/nelmio_api_doc.yaml +++ b/config/packages/nelmio_api_doc.yaml @@ -14,6 +14,8 @@ nelmio_api_doc: - { alias: ActivityEntity, type: App\Entity\Activity, groups: [Default, Entity, Activity] } - { alias: ActivityMetaField, type: App\Entity\ActivityMeta, groups: [Default, Activity] } - { alias: ActivityCollection, type: App\Entity\Activity, groups: [Default, Collection, Activity] } + - { alias: TagEditForm, type: App\Form\API\TagApiEditForm, groups: [Default, Entity, Tag] } + - { alias: TagEntity, type: App\Entity\Tag, groups: [Default, Entity, Tag] } - { alias: TimesheetEditForm, type: App\Form\API\TimesheetApiEditForm, groups: [Default, Entity, Timesheet] } - { alias: TimesheetEntity, type: App\Entity\Timesheet, groups: [Default, Entity, Timesheet] } - { alias: TimesheetMeta, type: App\Entity\TimesheetMeta, groups: [Default, Timesheet] } diff --git a/public/build/app.121b7493.js b/public/build/app.121b7493.js new file mode 100644 index 00000000..3db4bbe9 --- /dev/null +++ b/public/build/app.121b7493.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["app"],{"+2oP":function(t,e,n){"use strict";var i=n("I+eb"),o=n("hh1v"),r=n("6LWA"),s=n("I8vh"),a=n("UMSQ"),l=n("/GqU"),c=n("hBjN"),u=n("Hd5f"),d=n("tiKp")("species"),h=[].slice,f=Math.max;i({target:"Array",proto:!0,forced:!u("slice")},{slice:function(t,e){var n,i,u,p=l(this),m=a(p.length),g=s(t,m),v=s(void 0===e?m:e,m);if(r(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!r(n.prototype)?o(n)&&null===(n=n[d])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,g,v);for(i=new(void 0===n?Array:n)(f(v-g,0)),u=0;g")}),u=!r(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});t.exports=function(t,e,n,d){var h=s(t),f=!r(function(){var e={};return e[h]=function(){return 7},7!=""[t](e)}),p=f&&!r(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[l]=function(){return n}),n[h](""),!e});if(!f||!p||"replace"===t&&!c||"split"===t&&!u){var m=/./[h],g=n(h,""[t],function(t,e,n,i,o){return e.exec===a?f&&!o?{done:!0,value:m.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}),v=g[0],y=g[1];o(String.prototype,t,v),o(RegExp.prototype,h,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)}),d&&i(RegExp.prototype[h],"sham",!0)}}},"1E5z":function(t,e,n){var i=n("m/L8").f,o=n("UTVS"),r=n("tiKp")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}},"1Wo5":function(t,e,n){(function(t){var e=n("EVdn");t.$=t.jQuery=e,n("VSY+"),n("Onkx"),n("DPhY");var i=n("wd/R");t.moment=i,n("jnO4"),n("tGlX"),n("iYuL"),n("nyYc"),n("WxRl"),n("bpih"),n("B55N"),n("Ivi+"),n("0tRk"),n("lXzo"),n("e+ae"),n("X709"),n("eHjp"),n("+jAj"),n("Qiut"),n("vh7O"),n("WySY"),t.$.AdminLTE={},t.$.AdminLTE.options={},n("qG+3"),n("NlKh"),n("zcCC"),n("9/yf")}).call(this,n("yLpj"))},"2B1R":function(t,e,n){"use strict";var i=n("I+eb"),o=n("tycR").map;i({target:"Array",proto:!0,forced:!n("Hd5f")("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"2oRo":function(t,e,n){(function(e){var n="object",i=function(t){return t&&t.Math==Math&&t};t.exports=i(typeof globalThis==n&&globalThis)||i(typeof window==n&&window)||i(typeof self==n&&self)||i(typeof e==n&&e)||Function("return this")()}).call(this,n("yLpj"))},"33Wh":function(t,e,n){var i=n("yoRg"),o=n("eDl+");t.exports=Object.keys||function(t){return i(t,o)}},"3UD+":function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},"3bBZ":function(t,e,n){var i=n("2oRo"),o=n("/byt"),r=n("4mDm"),s=n("X2U+"),a=n("tiKp"),l=a("iterator"),c=a("toStringTag"),u=r.values;for(var d in o){var h=i[d],f=h&&h.prototype;if(f){if(f[l]!==u)try{s(f,l,u)}catch(t){f[l]=u}if(f[c]||s(f,c,d),o[d])for(var p in r)if(f[p]!==r[p])try{s(f,p,r[p])}catch(t){f[p]=r[p]}}}},"4Brf":function(t,e,n){"use strict";var i=n("I+eb"),o=n("g6v/"),r=n("2oRo"),s=n("UTVS"),a=n("hh1v"),l=n("m/L8").f,c=n("6JNq"),u=r.Symbol;if(o&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var d={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof h?new u(t):void 0===t?u():u(t);return""===t&&(d[e]=!0),e};c(h,u);var f=h.prototype=u.prototype;f.constructor=h;var p=f.toString,m="Symbol(test)"==String(u("test")),g=/^Symbol\((.*)\)[^)]+$/;l(f,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=p.call(t);if(s(d,t))return"";var n=m?e.slice(7,-1):e.replace(g,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:h})}},"4WOD":function(t,e,n){var i=n("UTVS"),o=n("ewvW"),r=n("93I0"),s=n("4Xet"),a=r("IE_PROTO"),l=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=o(t),i(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},"4Xet":function(t,e,n){var i=n("0Dky");t.exports=!i(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},"4l63":function(t,e,n){var i=n("I+eb"),o=n("5YOQ");i({global:!0,forced:parseInt!=o},{parseInt:o})},"4mDm":function(t,e,n){"use strict";var i=n("/GqU"),o=n("RNIs"),r=n("P4y1"),s=n("afO8"),a=n("fdAy"),l=s.set,c=s.getterFor("Array Iterator");t.exports=a(Array,"Array",function(t,e){l(this,{type:"Array Iterator",target:i(t),index:0,kind:e})},function(){var t=c(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}},"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},"5YOQ":function(t,e,n){var i=n("2oRo"),o=n("WKiH").trim,r=n("WJkJ"),s=i.parseInt,a=/^[+-]?0[Xx]/,l=8!==s(r+"08")||22!==s(r+"0x16");t.exports=l?function(t,e){var n=o(String(t));return s(n,e>>>0||(a.test(n)?16:10))}:s},"6JNq":function(t,e,n){var i=n("UTVS"),o=n("Vu81"),r=n("Bs8V"),s=n("m/L8");t.exports=function(t,e){for(var n=o(e),a=s.f,l=r.f,c=0;c",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,n,i,o=this.element[0].nodeName.toLowerCase(),r="textarea"===o,s="input"===o;this.isMultiLine=r||!s&&this._isContentEditable(this.element),this.valueMethod=this.element[r||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return e=!0,i=!0,void(n=!0);e=!1,i=!1,n=!1;var r=t.ui.keyCode;switch(o.keyCode){case r.PAGE_UP:e=!0,this._move("previousPage",o);break;case r.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case r.UP:e=!0,this._keyEvent("previous",o);break;case r.DOWN:e=!0,this._keyEvent("next",o);break;case r.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case r.TAB:this.menu.active&&this.menu.select(o);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:n=!0,this._searchTimeout(o)}},keypress:function(i){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||i.preventDefault());if(!n){var o=t.ui.keyCode;switch(i.keyCode){case o.PAGE_UP:this._move("previousPage",i);break;case o.PAGE_DOWN:this._move("nextPage",i);break;case o.UP:this._keyEvent("previous",i);break;case o.DOWN:this._keyEvent("next",i)}}},input:function(t){if(i)return i=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=t("