PageSourceSearch

https://www.blgcloud.fr/dist/modules/Extranet-ContactView-js-ContactView-js.js

js blgcloud.fr collected 2026-10-01 16:31:10 UTC 3,116 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2788],{97673(t,e,s){s.d(e,{default:()=>d});var i=s(17243),a=s(20188),n=s(54266);const o=["crm","contact"],r=["document","document"];class c extends a.A{constructor(...t){super(...t),this.objectDescription={contact:{location:o,field:[],customFields:!0},document:{location:r,field:[]}}}async initialize(){if(super.initialize(),this._serviceHandler.getUserService().getUserToken()){const e=this._serviceHandler.getTwigHelper();e.register(this._data.templates);const s=this._serviceHandler.getTemplateHelper();this._root.addClass("loading"),await this.getData(),this._renderData={data:i.get(this,"_data.contact"),templates:i.get(this,"_data.templates"),options:i.get(this,"_data.options"),user:this._serviceHandler.getUserService().getUserInfo(),format:this.format.bind(this),getLinkedObjectValue:this.getLinkedObjectValue.bind(this),getExternalHref:s.getExternalHref.bind(s),getObjectTitle:s.getObjectTitle.bind(s),round:s.round.bind(s),stringifyAttribute:s.stringifyAttribute.bind(s)};var t=this.renderTwig(e,"ContactView",this._renderData,this._translations);this._root.removeClass("loading"),this._root.append(t);const a=s.getObjectTitle(i.get(this,"_data.contact"));s.addBreadCrumbLastStep(a),this.setupEvents()}else this._serviceHandler.getUserService().loginRedirect(window.location)}setupEvents(){const t=this._serviceHandler.getTemplateHelper();window.blg.getServiceOnLoad("pdfViewer",t=>{t.setupEvents()}),window.blg.getServiceOnLoad("formModal",t=>{t.setupEvents()}),i.get(this._data,"options.backToTop")&&this._root.find(".js-back-to-top").off("click").on("click",t.scrollToTop),this._root.find(".js-change-status").off("click").on("click",()=>{const t=this._root.find("#status-choice")[0];this._changeStatus(t.options[t.selectedIndex].value)}),n(".blgModExtranetContactView + .blgModFormFormModal").off("needRefresh").on("needRefresh",this._refresh.bind(this))}async getData(){const t=this._serviceHandler.getApiClient(),e=this._data.options.userContact?this._serviceHandler.getUserService().getUserContactId():i.get(this,"_data.options.itemId");this._data.contact=await t.getObject(o,e)}format(t,e,s,i){const a=o;return this._serviceHandler.getApiFormater().format(a,e,s,i||null)}getLinkedObjectValue(t,e,s,a){let n=o;"document"===t&&(n=r);const c=this._serviceHandler.getApiFormater().getLinkedObject(n,e,s);return i.get(c,a,"")}async _changeStatus(t){const e=this._root.find(".js-change-status-spinner");e.addClass("processing");const s={status:t};try{const t=this._serviceHandler.getApiClient();await t.patchObject(o,i.get(this._data,"contact.id"),s),location.reload()}catch(t){console.warn("PATCH ERROR :",t)}e.removeClass("processing")}async _refresh(){await this.getData(),i.set(this._renderData,"data",i.get(this,"_data.contact"));const t=this._serviceHandler.getTwigHelper(),e=this.renderTwig(t,"ContactView",this._renderData,this._translations);this._root.empty(),this._root.append(e),this.setupEvents()}}i.set(window,["blg","Extranet","ContactView"],c);const d=c}}]);
2//# sourceMappingURL=Extranet-ContactView-js-ContactView-js.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.