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

assets.9202.b7ae5f06cfb24e54fb3e.js Maven / Gradle / Ivy

There is a newer version: 1.6.2
Show newest version
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[9202],{41953:function(e,t,n){var i=n(8081),a=n.n(i),s=n(23645),l=n.n(s)()(a());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},42105:function(e,t,n){var i=n(93379),a=n.n(i),s=n(7795),l=n.n(s),r=n(90569),c=n.n(r),u=n(3565),o=n.n(u),d=n(19216),m=n.n(d),p=n(44589),f=n.n(p),y=n(41953),b={};b.styleTagTransform=f(),b.setAttributes=o(),b.insert=c().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=m(),a()(y.Z,b),y.Z&&y.Z.locals&&y.Z.locals},39202:function(e,t,n){n.r(t);var i=n(70655),a=n(56256),s=n(49409),l=n(4107),r=n(19650),c=n(71577),u=n(50963),o=n(96486),d=n(67294),m=n(68432),p=n(15137),f=n(98542),y=n(82388),b=n(38900),g=n(36169),h=n(95969),E=n(73213),v=n(58369),T=n(16139),Z=n(64632),k=n(59583),S=n(48794),C=n(66537),I=n(76373),w=n(39486),L=n(24671),A=n(86385),N=n(46321),R=n(25131),q=n(89103);n(42105),t.default=function(){var e,t=(0,m.$)().t,n=(0,S.N)().currentUser,x=(0,p.TH)(),O=(0,p.k6)(),U=(0,i.CR)((0,u.useForm)(),1)[0],D=(0,p.UO)().entityType,P=(0,C.f)().fqn,F=new URLSearchParams(x.search),M=F.get("field"),V=F.get("value"),B=(0,i.CR)((0,d.useState)({}),2),W=B[0],Y=B[1],K=(0,i.CR)((0,d.useState)([]),2),_=K[0],H=K[1],X=(0,i.CR)((0,d.useState)([]),2),j=X[0],z=X[1],$=(0,i.CR)((0,d.useState)(""),2),G=$[0],J=$[1],Q=(0,i.CR)((0,d.useState)(!1),2),ee=Q[0],te=Q[1],ne=(0,d.useMemo)((function(){var e;return null!==(e=null==V?void 0:V.replaceAll(T.Xt,""))&&void 0!==e?e:""}),[V]),ie=(0,d.useMemo)((function(){return(0,A.wP)({value:V,entityType:D,entityData:W,field:M,startMessage:"Update description"})}),[V,D,M,W]),ae=(0,d.useMemo)((function(){var e=ne.split(E.o).slice(-1);return(0,A.dY)(e[0],(0,A.eB)(D,W),D)}),[M,W,D]),se=function(){return(0,o.isEmpty)(ae)||(0,o.isUndefined)(ae)?W.description||"":ae.description||""},le=function(){return M&&V?""+M+L.LV+V+L.LV+"description":v.Sn.DESCRIPTION};return(0,d.useEffect)((function(){(0,A.Dy)(D,P,Y)}),[P,D]),(0,d.useEffect)((function(){var e=(0,A.kF)(W);e&&(z(e),H(e)),U.setFieldsValue({title:ie.trimEnd(),assignees:e,description:se()})}),[W]),(0,d.useEffect)((function(){J(se())}),[W,ae]),(0,o.isEmpty)(W)?d.createElement(y.Z,null):d.createElement(b.Z,{firstPanel:{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(g.Z,{titleLinks:(0,i.ev)((0,i.ev)([],(0,i.CR)((0,A.rM)(W,D))),[{name:t("label.create-entity",{entity:t("label.task")}),activeTitle:!0,url:""}])}),d.createElement("div",{className:"m-t-0 request-description",key:"update-description"},d.createElement(a.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:U,layout:"vertical",onFinish:function(e){te(!0);var i={from:null==n?void 0:n.name,message:e.title||ie,about:(0,L.ec)(D,P,le()),taskDetails:{assignees:j.map((function(e){return{id:e.value,type:e.type}})),suggestion:e.description,type:k.U.UpdateDescription,oldValue:G},type:k.T.Task};(0,I.Kl)(i).then((function(){(0,N.XA)(t("server.create-entity-success",{entity:t("label.task")})),O.push(w.Z.getEntityLink(D,P,Z.M8.ACTIVITY_FEED,f.o.TASKS))})).catch((function(e){return(0,N.Eo)(e)})).finally((function(){return te(!1)}))}},d.createElement(s.Z.Item,{"data-testid":"title",label: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(R.Z,{options:_,value:j,onChange:z,onSearch:function(e){var t={query:e,setOptions:H};(0,A.Od)(t)}})),G&&d.createElement(s.Z.Item,{"data-testid":"description-tabs",label:t("label.description")+":",name:"description",rules:[{required:!0,message:t("message.field-text-is-required",{fieldText:t("label.description")})}]},d.createElement(q.Z,{suggestion:G,value:G})),d.createElement(s.Z.Item,null,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 O.goBack()}},t("label.back")),d.createElement(c.Z,{"data-testid":"submit-btn",htmlType:"submit",loading:ee,type:"primary"},t("label.submit")))))))},pageTitle:t("label.task"),secondPanel:{minWidth:60,flex:.4,children:d.createElement(h.Z,{hideBreadcrumbs:!0,showTags:!0,id:null!==(e=W.id)&&void 0!==e?e:"",source:(0,i.pi)((0,i.pi)({},W),{entityType:D})})}})}}}]);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy