All Downloads are FREE. Search and download functionalities are using the official Maven repository.

assets.2579.9bf1d89926b9972b5b0a.js Maven / Gradle / Ivy

There is a newer version: 1.6.0-rc1
Show newest version
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[2579],{26014:function(e,t,n){var a=n(8081),i=n.n(a),s=n(23645),l=n.n(s)()(i());l.push([e.id,'/*\n *  Copyright 2023 Collate.\n *  Licensed under the Apache License, Version 2.0 (the "License");\n *  you may not use this file except in compliance with the License.\n *  You may obtain a copy of the License at\n *  http://www.apache.org/licenses/LICENSE-2.0\n *  Unless required by applicable law or agreed to in writing, software\n *  distributed under the License is distributed on an "AS IS" BASIS,\n *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *  See the License for the specific language governing permissions and\n *  limitations under the License.\n */\n.request-tags .ant-select-custom,\n.request-description .ant-select-custom {\n  margin: 0;\n}\n.request-description .ant-tabs-description {\n  margin-top: 0;\n}\n.task-data {\n  width: unset;\n}\n',""]),t.Z=l},69510:function(e,t,n){var a=n(93379),i=n.n(a),s=n(7795),l=n.n(s),r=n(90569),c=n.n(r),o=n(3565),u=n.n(o),d=n(19216),m=n.n(d),p=n(44589),f=n.n(p),g=n(26014),y={};y.styleTagTransform=f(),y.setAttributes=u(),y.insert=c().bind(null,"head"),y.domAPI=l(),y.insertStyleElement=m(),i()(g.Z,y),g.Z&&g.Z.locals&&g.Z.locals},29638:function(e,t,n){n.r(t);var a=n(70655),i=n(56256),s=n(49409),l=n(4107),r=n(19650),c=n(71577),o=n(50963),u=n(96486),d=n(67294),m=n(68432),p=n(15137),f=n(98542),g=n(35850),y=n(89011),b=n(97359),h=n(36169),E=n(46343),v=n(58369),k=n(64632),T=n(59583),S=n(31615),Z=n(48794),C=n(66537),w=n(76373),I=n(30213),N=n(24671),R=n(86385),L=n(46321),q=n(91054);n(69510),t.default=function(){var e,t=(0,m.$)().t,n=(0,Z.N)().currentUser,x=(0,p.TH)(),A=(0,p.k6)(),D=(0,a.CR)((0,o.useForm)(),1)[0],O=(0,d.useRef)(),P=(0,p.UO)().entityType,V=(0,C.f)().fqn,F=new URLSearchParams(x.search),U=F.get("field"),z=F.get("value"),M=(0,a.CR)((0,d.useState)({}),2),W=M[0],B=M[1],H=(0,a.CR)((0,d.useState)([]),2),K=H[0],Y=H[1],_=(0,a.CR)((0,d.useState)([]),2),j=_[0],Q=_[1],X=(0,a.CR)((0,d.useState)(""),2),$=X[0],G=X[1],J=(0,a.CR)((0,d.useState)(!1),2),ee=J[0],te=J[1],ne=(0,d.useMemo)((function(){return(0,R.Qz)(P,V)}),[V,P]),ae=(0,d.useMemo)((function(){return(0,R.wP)({value:z,entityType:P,entityData:W,field:U,startMessage:"Request description"})}),[z,P,U,W]),ie=function(){return U&&z?""+U+N.LV+z+N.LV+"description":v.Sn.DESCRIPTION};return(0,d.useEffect)((function(){(0,R.Dy)(P,ne,B)}),[ne,P]),(0,d.useEffect)((function(){var e=(0,R.kF)(W);e&&(Q(e),Y(e)),D.setFieldsValue({title:ae.trimEnd(),assignees:e})}),[W]),(0,u.isEmpty)(W)?d.createElement(g.Z,null):d.createElement(y.Z,{className:"content-height-with-resizable-panel",firstPanel:{className:"content-resizable-panel-container",minWidth:700,flex:.6,children:d.createElement("div",{className:"max-width-md w-9/10 m-x-auto m-y-md d-grid gap-4"},d.createElement(h.Z,{titleLinks:(0,a.ev)((0,a.ev)([],(0,a.CR)((0,R.rM)(W,P))),[{name:t("label.create-entity",{entity:t("label.task")}),activeTitle:!0,url:""}])}),d.createElement("div",{className:"m-t-0 request-description",key:"request-description"},d.createElement(i.Z.Paragraph,{className:"text-base","data-testid":"form-title"},t("label.create-entity",{entity:t("label.task")})),d.createElement(s.Z,{"data-testid":"form-container",form:D,layout:"vertical",onFinish:function(e){var a;if(te(!0),j.length){var i={from:null==n?void 0:n.name,message:e.title||ae,about:(0,N.ec)(P,ne,ie()),taskDetails:{assignees:j.map((function(e){return{id:e.value,type:e.type}})),suggestion:null===(a=O.current)||void 0===a?void 0:a.getEditorContent(),type:T.U.RequestDescription,oldValue:""},type:S.Th.Task};(0,w.Kl)(i).then((function(){(0,L.XA)(t("server.create-entity-success",{entity:t("label.task")})),A.push(I.Z.getEntityLink(P,ne,k.M8.ACTIVITY_FEED,f.o.TASKS))})).catch((function(e){return(0,L.Eo)(e)})).finally((function(){return te(!1)}))}else(0,L.Eo)(t("server.no-task-creation-without-assignee"))}},d.createElement(s.Z.Item,{"data-testid":"title",label:t("label.task-entity",{entity:t("label.title")})+":",name:"title"},d.createElement(l.Z,{disabled:!0,placeholder:t("label.task-entity",{entity:t("label.title")})})),d.createElement(s.Z.Item,{"data-testid":"assignees",label:t("label.assignee-plural")+":",name:"assignees",rules:[{required:!0,message:t("message.field-text-is-required",{fieldText:t("label.assignee-plural")})}]},d.createElement(q.Z,{options:K,value:j,onChange:Q,onSearch:function(e){var t={query:e,setOptions:Y};(0,R.Od)(t)}})),d.createElement(s.Z.Item,{"data-testid":"description-label",label:t("label.suggest-entity",{entity:t("label.description")})+":",name:"SuggestDescription"},d.createElement(b.Z,{initialValue:"",placeHolder:t("label.suggest-entity",{entity:t("label.description")}),ref:O,style:{marginTop:"4px"},onTextChange:function(e){G(e)}})),d.createElement(s.Z.Item,{noStyle:!0},d.createElement(r.Z,{className:"w-full justify-end","data-testid":"cta-buttons",size:16},d.createElement(c.Z,{"data-testid":"cancel-btn",type:"link",onClick:function(){return A.goBack()}},t("label.back")),d.createElement(c.Z,{"data-testid":"submit-btn",htmlType:"submit",loading:ee,type:"primary"},t($?"label.suggest":"label.submit")))))))},pageTitle:t("label.task"),secondPanel:{className:"content-resizable-panel-container",minWidth:60,flex:.4,children:d.createElement(E.Z,{hideBreadcrumbs:!0,showTags:!0,id:null!==(e=W.id)&&void 0!==e?e:"",source:(0,a.pi)((0,a.pi)({},W),{entityType:P})})}})}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy