if (typeof (Avanade) == "undefined") { Avanade = { __namespace: true }; } if (typeof (Avanade.Hlv) == "undefined") { Avanade.Hlv = { __namespace: true }; } if (typeof (Avanade.Hlv.PortalAgenti) == "undefined") { Avanade.Hlv.PortalAgenti = { __namespace: true }; } const hlvConst = { colors: { red: "#C31622 !important", green: "#00818F !important", purple: "#8861A9 !important", black: "#000 !important", } }; $(document).ready(function () { $("#richiesta-lavorazione-body").hide(); $(".ricerca-ticket").hide(); if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(window.location.pathname)) { if (window.location.pathname.replace("/", "").trim().toLocaleLowerCase().indexOf("signin") > -1 || window.location.pathname.replace("/", "").trim().toLocaleLowerCase().indexOf("login") > -1) { var form = '
' + '
' + '
' + '' + '
' + '' + 'Accedi' + '
' + '
' + '
' + '
'; //$('form[action="/SignIn?ReturnUrl=%2F"]').parent().append('Accedi'); $('form[action^="/Account/Login/ExternalLogin"]').parent().append(form); $('form[action^="/Account/Login/ExternalLogin"] button').hide(); if (window.location.hostname.indexOf("sandbox") == -1) { $('form[action^="/SignIn?ReturnUrl=%2F"]').parent().hide() $('form[action^="/SignIn?ReturnUrl=%2F"] div div.form-group').hide(); $('form[action="/SignIn?ReturnUrl=%2F"] div #loginValidationSummary + div').hide() } } if (window.location.pathname.replace("/", "").trim().toLocaleLowerCase().indexOf("signin") == -1) { if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(window.location.search)) { if (window.location.search.indexOf("login_completed") > -1) { //window.location.search = window.location.search.replace("login_completed=true", ""); } } } } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(window.location.search)) { if (window.location.search.indexOf("login_completed") > -1) { var loaderdiv = '
' $('form[action^="/SignIn?ReturnUrl=%2F"]').parent().hide(); $('form[action^="/Account/Login/ExternalLogin"]').parent().hide(); $('form[action^="/Account/Login/ExternalLogin"]').parent().parent().append(loaderdiv); $('form[action^="/Account/Login/ExternalLogin"]').attr('action', $('form[action^="/Account/Login/ExternalLogin"]').attr('action').replace('login_completed%3Dtrue', '')); $('form[action^="/Account/Login/ExternalLogin"] button').click(); } } $("#form-signin-custom").on("submit", function () { return false; }) $("#signin-custom").on("click", function () { var dominio = "@helvetia.onmicrosoft.com"; var domain_hint = "helvetia.onmicrosoft.com"; var user = $("#UsernameCustom").val(); var host = window.location.hostname.replace(":", "%3A").replace("/", "%2F"); var tenantId = $('form[action="/Account/Login/ExternalLogin?ReturnUrl=%2F"] div button').attr("value"); var tenantId = "e6fb9963-6256-4aa8-8dbd-e45305f4dd5e"; var clientIdSvil = "3e668c84-0a39-474c-8f99-405d9e88fe2a"; var clientIdColl = "f0673a28-dd2f-4292-8ce2-e6e8909f9296"; var clientIdProd = "48101a22-52c1-4794-945e-53240297ab2e"; var clientId = ""; if (window.location.hostname.indexOf("sandbox") > -1) { clientId = clientIdSvil; } else if (window.location.hostname.indexOf("collaudo") > -1) { clientId = clientIdColl; } else { clientId = clientIdProd; } var url = "https://login.microsoftonline.com/"; url += tenantId + "/oauth2/authorize?response_type=code"; url += "&scope=openid%20profile"; url += "&client_id=" + clientId; url += "&redirect_uri=https%3A%2F%2F" + host + "?login_completed=true"; url += "&response_mode=form_post"; url += "&sso_reload=true"; url += "&login_hint=" + user + dominio; url += "&domain_hint=" + domain_hint; // $("#signin-custom").attr("href", url); // $("#signin-custom")[0].click(); window.location.href = url; }) }); Avanade.Hlv.Rest = new function () { const self = this; var getXhr = function () { /// /// Get an instance of XMLHttpRequest for all browsers /// if (window.XMLHttpRequest) { // Chrome, Firefox, IE7+, Opera, Safari // ReSharper disable InconsistentNaming return new window.XMLHttpRequest(); // ReSharper restore InconsistentNaming } // IE6 try { // The latest stable version. It has the best security, performance, // reliability, and W3C conformance. Ships with Vista, and available // with other OS's via downloads and updates. return new window.ActiveXObject("MSXML2.XMLHTTP.6.0"); } catch (e) { try { // The fallback. return new window.ActiveXObject("MSXML2.XMLHTTP.3.0"); } catch (e) { window.alertMessage("This browser is not AJAX enabled."); return null; } } }; var dateReviver = function (key, value) { var a; if (typeof value === "string") { a = /Date\(([-+]?\d+)\)/.exec(value); if (a) { return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10)); } } return value; }; var errorHandler = function (req) { return new Error("Error : " + req.status + ": " + req.statusText + ": " + JSON.parse(req.responseText).error.message.value); }; var stringParameterCheck = function (parameter, message) { if (typeof parameter != "string") { throw new Error(message); } }; var callbackParameterCheck = function (callbackParameter, message) { if (typeof callbackParameter != "function") { throw new Error(message); } }; var booleanParameterCheck = function (parameter, message) { if (typeof parameter != "boolean") { throw new Error(message); } }; self.Get = function (url, successCallback, errorCallback, async) { stringParameterCheck(url, "Avanade.Hlv.Rest.Get requires the url parameter is a string."); callbackParameterCheck(successCallback, "Avanade.Hlv.Rest.Get requires the successCallback parameter is a function."); callbackParameterCheck(errorCallback, "Avanade.Hlv.Rest.Get requires the errorCallback parameter is a function."); booleanParameterCheck(async, "Avanade.Hlv.Rest.Get requires the async parameter is a boolean."); var req = getXhr(); req.open("GET", url, async); req.setRequestHeader("Accept", "application/json"); req.setRequestHeader("Content-Type", "application/json; charset=utf-8"); if (async) { req.onreadystatechange = function () { if (req.readyState === 4 /* complete */) { if (req.status === 200) { return successCallback(JSON.parse(req.responseText, dateReviver)); } else { return errorCallback(errorHandler(req)); } } }; req.send(); } else { req.send(); if (req.status === 200) { return JSON.parse(req.responseText, dateReviver); } else { return errorCallback(errorHandler(req)); } } }; }; Avanade.Hlv.PortalAgenti.Common = new function () { const self = this; var getBaseUrl = function () { return document.location.protocol + "//" + document.location.host; }; var isDebug = function (url) { return url.indexOf("localhost") >= 0; }; var errorHandler = function (error) { window.console.error(error); }; var makeHttpGet = function (url, fnDone) { if (typeof fnDone === "function") { return Avanade.Hlv.Rest.Get(url, fnDone, errorHandler, true); } else { return Avanade.Hlv.Rest.Get(url, function (data) { return data; }, errorHandler, false); } }; var makeFakeHttpGet = function (json, fnDone) { const obj = JSON.parse(json); if (typeof fnDone === "function") { return fnDone(obj); } else { return obj; } }; self.isStringNullOrEmpty = function (string) { if (string == null) return true; if (typeof string === "undefined") return true; if (string.trim() == "") return true; return false; }; self.goToTop = function () { window.scrollTo(0, 0); }; self.changeColorGreen = function () { $(".entitylist").on("loaded", function () { $("#richiesteBody-ticket-section td[data-attribute='ticketnumber'] a").addClass("customLinkVoice"); $(".customLinkVoice").css("color", hlvConst.colors.green) $("#customLinkVoiceHrefOpen").css("color", hlvConst.colors.green) $("#customLinkVoiceHrefClosed").css("color", hlvConst.colors.green) $("#customLinkVoiceHrefProgress").css("color", hlvConst.colors.green) $("#richiesteBody-ticket-section tr td:last-child").hide(); }) $(".sort-enabled:not(.sort)").css("color", hlvConst.colors.black); $(".sort a").css("color", hlvConst.colors.green) $(".changingFont").css("color", hlvConst.colors.green); $(".sort-enabled a").addClass("sort-green"); $(".sort-enabled a").removeClass("sort-red"); $(".sort-enabled a").removeClass("sort-purple"); $(".ticketFilter-option").removeClass("ticketFilter-selected"); $(".ticketFilter-option-cerca").removeClass("ticketFilter-selected"); $(".ticketFilter-option.hover-green").addClass("ticketFilter-selected"); $("#inProgressNodeCasesResults").hide(); $("#inProgressSubNodeCasesResults").hide(); $("#openNodeCasesResults").hide(); $("#openSubNodeCasesResults").hide(); $("#closedNodeCasesResults").hide(); $("#closedSubNodeCasesResults").hide(); $("#closedPersonalCasesResults").show(); $("#openPersonalCasesResults").show(); $("#inProgressPersonalCasesResults").show(); $("#richiesteBody-ticket-section-general").show(); $("#richiesteBody-ticket-section-results").hide(); }; self.changeColorRed = function () { $(".entitylist").on("loaded", function () { $("#richiesteBody-ticket-section td[data-attribute='ticketnumber'] a").addClass("customLinkVoice"); $("#customLinkVoiceHrefOpen").css("color", hlvConst.colors.red) $("#customLinkVoiceHrefClosed").css("color", hlvConst.colors.red) $("#customLinkVoiceHrefProgress").css("color", hlvConst.colors.red) $(".customLinkVoice").css("color", hlvConst.colors.red) $("#richiesteBody-ticket-section tr td:last-child").hide(); }) $(".sort-enabled:not(.sort)").css("color", hlvConst.colors.black); $(".sort a").css("color", hlvConst.colors.red) $(".changingFont").css("color", hlvConst.colors.red) $(".sort-enabled a").addClass("sort-red"); $(".sort-enabled a").removeClass("sort-green"); $(".sort-enabled a").removeClass("sort-purple"); $(".ticketFilter-option").removeClass("ticketFilter-selected"); $(".ticketFilter-option-cerca").removeClass("ticketFilter-selected"); $(".ticketFilter-option.hover-red").addClass("ticketFilter-selected"); $("#inProgressNodeCasesResults").show(); $("#inProgressSubNodeCasesResults").hide(); $("#openNodeCasesResults").show(); $("#openSubNodeCasesResults").hide(); $("#closedNodeCasesResults").show(); $("#closedSubNodeCasesResults").hide(); $("#closedPersonalCasesResults").hide(); $("#openPersonalCasesResults").hide(); $("#inProgressPersonalCasesResults").hide(); $("#richiesteBody-ticket-section-general").show(); $("#richiesteBody-ticket-section-results").hide(); }; self.changeColorPurple = function () { $(".entitylist").on("loaded", function () { $("#richiesteBody-ticket-section td[data-attribute='ticketnumber'] a").addClass("customLinkVoice"); $("#customLinkVoiceHrefOpen").css("color", hlvConst.colors.purple) $("#customLinkVoiceHrefClosed").css("color", hlvConst.colors.purple) $("#customLinkVoiceHrefProgress").css("color", hlvConst.colors.purple) $(".customLinkVoice").css("color", hlvConst.colors.purple) $("#richiesteBody-ticket-section tr td:last-child").hide(); }) $(".sort-enabled:not(.sort)").css("color", hlvConst.colors.black); $(".sort a").css("color", hlvConst.colors.purple) $(".changingFont").css("color", hlvConst.colors.purple) $(".sort-enabled a").addClass("sort-purple"); $(".sort-enabled a").removeClass("sort-red"); $(".sort-enabled a").removeClass("sort-green"); $(".ticketFilter-option").removeClass("ticketFilter-selected"); $(".ticketFilter-option-cerca").removeClass("ticketFilter-selected"); $(".ticketFilter-option.hover-purple").addClass("ticketFilter-selected"); $("#inProgressNodeCasesResults").hide(); $("#inProgressSubNodeCasesResults").show(); $("#openNodeCasesResults").hide(); $("#openSubNodeCasesResults").show(); $("#closedNodeCasesResults").hide(); $("#closedSubNodeCasesResults").show(); $("#closedPersonalCasesResults").hide(); $("#openPersonalCasesResults").hide(); $("#inProgressPersonalCasesResults").hide(); $("#richiesteBody-ticket-section-general").show(); $("#richiesteBody-ticket-section-results").hide(); }; self.getPortalComment = function (incidentid, fnDone) { const url = getBaseUrl(); const urlToRequest = url + "/get-portalcomment?id=" + incidentid; return makeHttpGet(urlToRequest, fnDone); }; self.getCompany = function (agencyId, fnDone) { const url = getBaseUrl(); const urlToRequest = url + "/Get-Company?agencyid=" + agencyId; return makeHttpGet(urlToRequest, fnDone); }; self.getCompanies = function (fnDone) { const url = getBaseUrl(); const urlToRequest = url + "/Get-Companies"; return makeHttpGet(urlToRequest, fnDone); }; self.getBusinessLine = function (companyid, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { const json = '[{"hlv_businessline_label": "Motor", "hlv_businessline_value": "855600000", "hlv_bank_lookup": "cf9f7803-fb86-eb11-a812-000d3adc5158"},{"hlv_businessline_label": "Non Motor", "hlv_businessline_value": "855600001", "hlv_bank_lookup": "cf9f7803-fb86-eb11-a812-000d3adc5158"},{"hlv_businessline_label": "Vita", "hlv_businessline_value": "855600003", "hlv_bank_lookup": "cf9f7803-fb86-eb11-a812-000d3adc5158"}]'; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/Get-BusinessLine?companyid=" + companyid; return makeHttpGet(urlToRequest, fnDone); } }; self.getOperation = function (businessLine, bank, company, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { const json = '[{"hlv_operation_label": "Vendita", "hlv_operation_value": "855600000"},{"hlv_operation_label": "Post Vendita", "hlv_operation_value": "855600001"},{"hlv_operation_label": "Sinistri", "hlv_operation_value": "855600003"}]'; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-operations?hlv_businessline=" + businessLine + "&hlv_bank=" + bank + "&company=" + company; return makeHttpGet(urlToRequest, fnDone); } }; self.getRequestTypology = function (businessLine, bank, level, operation, company, fnDone) { if (typeof level === "string") { level = parseInt(level); } else if (typeof level !== "number") { level = 1; } const url = getBaseUrl(); if (isDebug(url)) { const json = '[{"hlv_name": "Rendiconti provvigioni","hlv_level": "1","hlv_tipologierichiestaid": "3d25eb57-3b9d-eb11-b1ac-000d3ab7f78b"},{"hlv_name": "Richiesta Informazioni","hlv_level": "1","hlv_tipologierichiestaid": "de8d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Rendiconti provvigioni","hlv_level": "1","hlv_tipologierichiestaid": "e08d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Supporto Operativo","hlv_level": "1","hlv_tipologierichiestaid": "e28d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Segnalazione Anomalia","hlv_level": "1","hlv_tipologierichiestaid": "e48d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Gestione utenti","hlv_level": "1","hlv_tipologierichiestaid": "e68d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Archiviazione","hlv_level": "1","hlv_tipologierichiestaid": "e88d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Annullamento","hlv_level": "1","hlv_tipologierichiestaid": "ea8d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Disdetta","hlv_level": "1","hlv_tipologierichiestaid": "ec8d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Richiesta Informazioni","hlv_level": "1","hlv_tipologierichiestaid": "ee8d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Richiesta Variazioni","hlv_level": "1","hlv_tipologierichiestaid": "f08d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Attestazione pagamento","hlv_level": "1","hlv_tipologierichiestaid": "f28d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Dichiarazione Fiscale","hlv_level": "1","hlv_tipologierichiestaid": "f48d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Segnalazione Anomalia","hlv_level": "1","hlv_tipologierichiestaid": "f68d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Supporto operativo","hlv_level": "1","hlv_tipologierichiestaid": "f88d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Richiesta annullamento","hlv_level": "1","hlv_tipologierichiestaid": "fa8d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Richiesta Informazioni","hlv_level": "1","hlv_tipologierichiestaid": "fc8d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Richiesta Modulistica","hlv_level": "1","hlv_tipologierichiestaid": "fe8d16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Richiesta Reportistica","hlv_level": "1","hlv_tipologierichiestaid": "008e16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Richiesta Informazione","hlv_level": "1","hlv_tipologierichiestaid": "028e16e6-3a9d-eb11-b1ac-000d3ab7fe79"},{"hlv_name": "Richiesta supporto","hlv_level": "1","hlv_tipologierichiestaid": "048e16e6-3a9d-eb11-b1ac-000d3ab7fe79"}]'; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-typology?hlv_businessline=" + businessLine + "&hlv_bank=" + bank + "&hlv_level=" + level + "&hlv_operation=" + operation + "&company=" + company; return makeHttpGet(urlToRequest, fnDone); } }; self.getRequestTypologyAfterOne = function (businessLine, bank, level, parentTypeId, company, fnDone) { if (typeof level === "string") { level = parseInt(level); } else if (typeof level !== "number") { level = 1; } const url = getBaseUrl(); if (isDebug(url)) { let json = "[]"; if (level === 1) { json = '[{"hlv_name": "richiesta nuovo invio rendiconto","hlv_level": "2","hlv_tipologierichiestaid": "25cc34c6-d59d-eb11-b1ac-000d3ab7f619"},{"hlv_name": "richiesta ulteriori dettagli o informazioni su provvigioni mancanti","hlv_level": "2","hlv_tipologierichiestaid": "4959a7cc-d59d-eb11-b1ac-000d3ab7fab2"}]'; } return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-typologyminor?hlv_businessline=" + businessLine + "&hlv_bank=" + bank + "&hlv_level=" + (level + 1) + "&hlv_parentrequest=" + parentTypeId + "&company=" + company; return makeHttpGet(urlToRequest, fnDone); } }; self.getParentReqTypology = function (reqId, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { let json = "[]"; if (level === 1) { json = '[{"hlv_name": "richiesta nuovo invio rendiconto","hlv_level": "2","hlv_tipologierichiestaid": "25cc34c6-d59d-eb11-b1ac-000d3ab7f619"},{"hlv_name": "richiesta ulteriori dettagli o informazioni su provvigioni mancanti","hlv_level": "2","hlv_tipologierichiestaid": "4959a7cc-d59d-eb11-b1ac-000d3ab7fab2"}]'; } return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-parent-typlogy?reqTypeId=" + reqId; return makeHttpGet(urlToRequest, fnDone); } } self.getDatiMinimiByReqType = function (reqid, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { let json = "[]"; if (level === 1) { json = '' } return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-datiminimi?reqid=" + reqid; return makeHttpGet(urlToRequest, fnDone); } } self.getNode = function (companyid, field, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { let json = "[]"; if (level === 1) { json = '' } return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-node?companyid=" + companyid + '&nodefield=' + field; return makeHttpGet(urlToRequest, fnDone); } } self.getNodeById = function (nodeid, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { let json = "[]"; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-node-by-id?nodeid=" + nodeid; return makeHttpGet(urlToRequest, fnDone); } }; self.getLastReqType = function (companyid, name, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { let json = "[]"; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-lastreqtype?companyid=" + companyid + "&name=" + name; return makeHttpGet(urlToRequest, fnDone); } }; self.getKnowledgeBaseArticles = function (typologyId, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { const json = '[{"title":"Apertura contenzioso","knowledgearticleviews":"4","knowledgearticleid":"40a1d686-db77-e911-a828-000d3ab18b39","description":"Apertura contenzioso su titolo in arretrato","content":"L\'intermediario ci richiede l\'invio al contenzioso di titolo scaduto tramite compilazione modello A/2 indicando:n. di polizza, effetto, importo e flaggando la casella che ci consiglia l\'azione legale indicando nel campo note tutti gli elementi utili al reperimento del contarente, ad es. nuovo indirizzo, nominativo e indirizzo dell\'amministratore di condominio. Al modello A/2 allega anche quietanza. Ricevuta la documentazione verifichiamo in pass, che il titolo sia effettivamente in arretrato, che in caso di presenza di vincolo, inoltriamo la richiesta a Service Unit-Portafoglio Agenzie e Broker per invio lettera all\'ente Vincolatario. Successivamente compiliamo un file excel con tutte le richieste ricevute dagli intermediari e lo inviamo all\'Outsourcer per apertura contenzioso in pass."},{"title": "Test J","knowledgearticleviews": "0","description": "dddss","knowledgearticleid": "901b7865-7280-e911-a829-000d3ab18255"},{"title": "Test J","knowledgearticleviews": "0","description": "","knowledgearticleid": "941b7865-7280-e911-a829-000d3ab18255"},{"title": "Prova plug-in 0810 01 02","knowledgearticleviews": "0","description": "ddd","knowledgearticleid": "a4ce375f-a6e9-e911-a834-000d3ab18255"},{"title": "Prova plug-in 0810 01","knowledgearticleviews": "0","description": "","knowledgearticleid": "b1ce375f-a6e9-e911-a834-000d3ab18255"},{"title": "Accesso all\'Area Riservata","knowledgearticleviews": "2","description": "Il Cliente ha sbagliato l\'indirizzo di registrazione al sito New My Helvetia","knowledgearticleid": "7cd8cd8b-1277-e911-a82c-000d3ab182a9"},{"title": "Accesso all\'Area Riservata","knowledgearticleviews": "12","description": "","knowledgearticleid": "7ed8cd8b - 1277 - e911 - a82c - 000d3ab182a9"},{"title": "Proposta di collaborazione","knowledgearticleviews": "0","description": "Fornitore si propone per vendita / sponsorship / partnership con Helvetia.","knowledgearticleid": "ac6fe635 - dc77 - e911 - a82c - 000d3ab182a9"},{"title": "Proposta di collaborazione","knowledgearticleviews": "0","description": "","knowledgearticleid": "ad6fe635 - dc77 - e911 - a82c - 000d3ab182a9"},{"title": "test con op 2 livddd","knowledgearticleviews": "0","description": "bla bla","knowledgearticleid": "d7e9f019 - 2ae5 - e911 - a841 - 000d3ab18325"},{"title": "test con op 2 liv","knowledgearticleviews": "0","description": "","knowledgearticleid": "d9e9f019 - 2ae5 - e911 - a841 - 000d3ab18325"},{"title": "Elenco Polizze Esistenti","knowledgearticleviews": "0","description": "","knowledgearticleid": "4389828d - d5e5 - e911 - a841 - 000d3ab18325"},{"title": "Elenco Polizze Esistenti","knowledgearticleviews": "0","description": "","knowledgearticleid": "072982d0 - d5e5 - e911 - a841 - 000d3ab18325"},{"title": "Accesso all\'Area Riservata","knowledgearticleviews": "0","description": "Il Cliente ha sbagliato l\'indirizzo di registrazione al sito New My Helvetia","knowledgearticleid": "e1c8d267 - d6e5 - e911 - a841 - 000d3ab18325"}]'; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/Get-KnowledgeBase?hlv_tipologiarichiestaid=" + typologyId; return makeHttpGet(urlToRequest, fnDone); } }; self.getKnowledgeBaseMostRead = function (fnDone) { const url = getBaseUrl(); if (isDebug(url)) { let json = "[{\"title\": \"Incasso titolo al contenzioso\",\"knowledgearticleviews\": \"16\",\"description\": \"Abilitazione incasso titolo al contenzioso\",\"knowledgearticleid\": \"42a1d686-db77-e911-a828-000d3ab18b39\", \"content\": \"L%27intermediario%20incassa%20il%20titolo%20dal%20cliente%20e%20richiede%20sblocco%20in%20Pass%20per%20poter%20procedere%20allo%20scarico%20a%20foglio%20cassa.%20La%20richiesta%20deve%20indicare%20l%27importo%20pagato%20oltre%20all%27indicazione%20del%20numero%20di%20polizza.%20Tramite%20apposita%20funzione%20si%20abilita%20all%27incasso%20l%27intermediario%20e%20in%20caso%20l%27importo%20comprenda%20anche%20le%20spese%20legali%20del%2010%25%2C%20si%20comunica%20alla%20Contabilit%C3%A0%20Agenzie%20di%20procedere%20al%20carico%20delle%20stesse%20tramite%20PNT%20per%20consentirne%20lo%20scarico%20a%20foglio%20cassa\"},{\"title\": \"Incasso titolo al contenzioso\",\"knowledgearticleviews\": \"16\",\"description\": \"\",\"knowledgearticleid\": \"0dd7808e-db77-e911-a838-000d3ab18b89\", \"content\": \"\"},{\"title\": \"Accesso all'Area Riservata\",\"knowledgearticleviews\": \"12\",\"description\": \"\",\"knowledgearticleid\": \"7ed8cd8b-1277-e911-a82c-000d3ab182a9\", \"content\": \"\"},{\"title\": \"Richiesta di collaborazione come dipendente\",\"knowledgearticleviews\": \"11\",\"description\": \"Richiesta di collaborazione come dipendente\",\"knowledgearticleid\": \"b3bcb332-8704-ea11-a811-000d3ab8d09b\", \"content\": \"%3Cp%3EBuongiorno%2C%3Cbr%3E%0Aabbiamo%20inoltrato%20il%20suo%20messaggio%20all%27ufficio%20competente%20che%20la%20contatter%C3%A0%20qualora%20interessato%20alla%20sua%20candidatura.%3C%2Fp%3E%0A%0A%3Cp%3ECordialit%C3%A0.%3C%2Fp%3E%0A%0A%3Cp%3ECoo%20-%20Service%20Unit%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%20%26%23160%3B%3Cbr%3E%0AContact%20Center%3Cbr%3E%0AGruppo%20Helvetia%20Italia%3Cbr%3E%0AVia%20G.B.%20Cassinis%2C%2021%20%E2%80%93%2020139%20Milano%3C%2Fp%3E%0A%0A%3Cp%3E%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%3Cbr%3E%0ALa%20segnalazione%20va%20girata%20all%27indirizzo%20email%3A%20%3Cstrong%3Erisorseumane.recruitment%40helvetia.it%3C%2Fstrong%3E%3C%2Fp%3E%0A%0A%0A\"},{\"title\": \"Richiesta di collaborazione come dipendente\",\"knowledgearticleviews\": \"11\",\"description\": \"\",\"knowledgearticleid\": \"b4bcb332-8704-ea11-a811-000d3ab8d09b\", \"content\": \"\"},{\"title\": \"Accesso all'Area Riservata\",\"knowledgearticleviews\": \"10\",\"description\": \"Il Cliente ha sbagliato l'indirizzo di registrazione al sito New My Helvetia\",\"knowledgearticleid\": \"62223530-9a7c-e911-a839-000d3ab187b5\", \"content\": \"%3Cp%3EEliminare%20la%20registrazione%20del%20cliente%20ed%20inviare%20il%20seguente%20riscontro%20via%20E-Mail.%3C%2Fp%3E%0A%0A%3Cp%3EGentile%20Cliente%2C%3C%2Fp%3E%0A%0A%3Cp%3Ela%20informiamo%20che%20l%27indirizzo%20errato%20%C3%A8%20stato%20rimosso%20dal%20sistema%20MyHelvetia.%3C%2Fp%3E%0A%0A%3Cp%3ELa%20preghiamo%20di%20ripetere%20le%20operazioni%20di%20registrazione.%3C%2Fp%3E%0A%0A%3Cp%3ECordiali%20Saluti%2C%3C%2Fp%3E%0A%0A%3Cp%3EIl%20Contact%20Center%20di%20Helvetia%20Assicurazioni%3C%2Fp%3E%0A%0A%0A\"},{\"title\": \"Variazione vincolo a seguito surroga mutuo\",\"knowledgearticleviews\": \"9\",\"description\": \"Il cliente chiede di poter inserire un vincolo a favore di un Istituto di Credito a seguito della surroga del mutuo\",\"knowledgearticleid\": \"3ca1d686-db77-e911-a828-000d3ab18b39\", \"content\": \"ING%20BANK%20N.V.%20INOLTRARE%20RISPOSTA%20MEZZO%20MAIL%20CON%20IL%20SEGUENTE%20TESTO%3A%20%0ABuongiorno%2Ccon%20la%20presente%20Le%20comunichiamo%20che%20l%27intero%20premio%20relativo%20alla%20polizza%20Incendio%20n.%20101%2F01%2F182073%20ci%20%C3%A8%20stato%20a%20suo%20tempo%20corrisposto%20dalla%20Spett.le%20Ing%20Direct%20N.V.%20%28ora%20Ing%20Bank%20N.V.%29%20la%20quale%20offriva%20la%20copertura%20assicurativa%2C%20in%20forma%20gratuita%2C%20ai%20propri%20mutuatari.%0APer%20quanto%20sopra%20esposto%20nessun%20rimborso%20%C3%A8%20dovuto.%0ARimaniamo%20a%20disposizione%20per%20eventuali%20chiarimenti%20e%20cogliamo%20l%27occasione%20per%20porgere%20cordiali%20saluti.\"},{\"title\": \"Variazione vincolo a seguito surroga mutuo\",\"knowledgearticleviews\": \"9\",\"description\": \"\",\"knowledgearticleid\": \"efd6808e-db77-e911-a838-000d3ab18b89\", \"content\": \"\"},{\"title\": \"Scarico a foglio cassa\",\"knowledgearticleviews\": \"8\",\"description\": \"scarico a foglio cassa spese legali\",\"knowledgearticleid\": \"48a1d686-db77-e911-a828-000d3ab18b39\", \"content\": \"L%27intermediario%20richiede%20procedura%20per%20scarico%20a%20foglio%20cassa%20delle%20spese%20legali.%20La%20richiesta%20deve%20essere%20inoltrata%20a%20Service%20Unit-contabilit%C3%A0%20Intermediari\"},{\"title\": \"Scarico a foglio cassa\",\"knowledgearticleviews\": \"8\",\"description\": \"\",\"knowledgearticleid\": \"25d7808e-db77-e911-a838-000d3ab18b89\", \"content\": \"\"},{\"title\": \"Abbuono \",\"knowledgearticleviews\": \"6\",\"description\": \"Spese legali\",\"knowledgearticleid\": \"4ca1d686-db77-e911-a828-000d3ab18b39\", \"content\": \"L%27intermediario%20ci%20richiede%20di%20soprassedere%20all%27incasso%20delle%20spese%20legali.%20Si%20effettua%20una%20valutazione%20per%20importanza%20cliente%2Ftipo%20agenzia%2C%20ecc\"},{\"title\": \"Abbuono \",\"knowledgearticleviews\": \"6\",\"description\": \"\",\"knowledgearticleid\": \"35d7808e-db77-e911-a838-000d3ab18b89\", \"content\": \"\"},{\"title\": \"Apertura contenzioso\",\"knowledgearticleviews\": \"3\",\"description\": \"Apertura contenzioso su titolo in arretrato\",\"knowledgearticleid\": \"40a1d686-db77-e911-a828-000d3ab18b39\", \"content\": \"L%27intermediario%20ci%20richiede%20l%27invio%20al%20contenzioso%20di%20titolo%20scaduto%20tramite%20compilazione%20modello%20A%2F2%20indicando%3An.%20di%20polizza%2C%20effetto%2C%20importo%20e%20flaggando%20la%20casella%20che%20ci%20consiglia%20l%27azione%20legale%20indicando%20nel%20campo%20note%20tutti%20gli%20elementi%20utili%20al%20reperimento%20del%20contarente%2C%20ad%20es.%20nuovo%20indirizzo%2C%20nominativo%20e%20indirizzo%20dell%27amministratore%20di%20condominio.%20Al%20modello%20A%2F2%20allega%20anche%20quietanza.%20Ricevuta%20la%20documentazione%20verifichiamo%20in%20pass%2C%20che%20il%20titolo%20sia%20effettivamente%20in%20arretrato%2C%20che%20in%20caso%20di%20presenza%20di%20vincolo%2C%20inoltriamo%20la%20richiesta%20a%20Service%20Unit-Portafoglio%20Agenzie%20e%20Broker%20per%20invio%20lettera%20all%27ente%20Vincolatario.%20Successivamente%20compiliamo%20un%20file%20excel%20con%20tutte%20le%20richieste%20ricevute%20dagli%20intermediari%20e%20lo%20inviamo%20all%27Outsourcer%20per%20apertura%20contenzioso%20in%20pass.\"},{\"title\": \"Apertura contenzioso\",\"knowledgearticleviews\": \"3\",\"description\": \"\",\"knowledgearticleid\": \"05d7808e-db77-e911-a838-000d3ab18b89\", \"content\": \"\"},{\"title\": \"Circolare - Auto\",\"knowledgearticleviews\": \"3\",\"description\": \"\",\"knowledgearticleid\": \"4a3ae324-de53-ea11-a812-000d3ab8d792\", \"content\": \"\"}]"; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/Get-KnowledgeBase-MostRead"; return makeHttpGet(urlToRequest, fnDone); } }; self.getNews = function (fnDone) { const url = getBaseUrl(); if (isDebug(url)) { const json = "[]"; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/Get-News"; return makeHttpGet(urlToRequest, fnDone); } }; self.getArticleViews = function (idkb, agId, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { const json = "[]"; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/Get-ArticleViews?idkb=" + idkb + "&nodeid=" + agId; return makeHttpGet(urlToRequest, fnDone); } }; self.buildParam = function (bcItems) { if (typeof bcItems !== "undefined" && bcItems !== null && bcItems.length > 0) { var paramList = []; bcItems.forEach(function (item, index) { paramList.push({ id: item.id, label: item.label, type: item.type, value: item.value }); }); var strParam = encodeURI(JSON.stringify(paramList)); strParam = strParam != null ? strParam.replace(/&/g, '%26') : ""; return strParam; } return ""; }; self.getKnowledgeBaseByName = function (name, companyid, fnDone) { const url = getBaseUrl(); if (isDebug(url)) { const json = '[{"title":"Apertura contenzioso","knowledgearticleviews":"4","knowledgearticleid":"40a1d686-db77-e911-a828-000d3ab18b39","description":"Apertura contenzioso su titolo in arretrato","content":"L\'intermediario ci richiede l\'invio al contenzioso di titolo scaduto tramite compilazione modello A/2 indicando:n. di polizza, effetto, importo e flaggando la casella che ci consiglia l\'azione legale indicando nel campo note tutti gli elementi utili al reperimento del contarente, ad es. nuovo indirizzo, nominativo e indirizzo dell\'amministratore di condominio. Al modello A/2 allega anche quietanza. Ricevuta la documentazione verifichiamo in pass, che il titolo sia effettivamente in arretrato, che in caso di presenza di vincolo, inoltriamo la richiesta a Service Unit-Portafoglio Agenzie e Broker per invio lettera all\'ente Vincolatario. Successivamente compiliamo un file excel con tutte le richieste ricevute dagli intermediari e lo inviamo all\'Outsourcer per apertura contenzioso in pass."},{"title": "Test J","knowledgearticleviews": "0","description": "dddss","knowledgearticleid": "901b7865-7280-e911-a829-000d3ab18255"},{"title": "Test J","knowledgearticleviews": "0","description": "","knowledgearticleid": "941b7865-7280-e911-a829-000d3ab18255"},{"title": "Prova plug-in 0810 01 02","knowledgearticleviews": "0","description": "ddd","knowledgearticleid": "a4ce375f-a6e9-e911-a834-000d3ab18255"},{"title": "Prova plug-in 0810 01","knowledgearticleviews": "0","description": "","knowledgearticleid": "b1ce375f-a6e9-e911-a834-000d3ab18255"},{"title": "Accesso all\'Area Riservata","knowledgearticleviews": "2","description": "Il Cliente ha sbagliato l\'indirizzo di registrazione al sito New My Helvetia","knowledgearticleid": "7cd8cd8b-1277-e911-a82c-000d3ab182a9"},{"title": "Accesso all\'Area Riservata","knowledgearticleviews": "12","description": "","knowledgearticleid": "7ed8cd8b - 1277 - e911 - a82c - 000d3ab182a9"},{"title": "Proposta di collaborazione","knowledgearticleviews": "0","description": "Fornitore si propone per vendita / sponsorship / partnership con Helvetia.","knowledgearticleid": "ac6fe635 - dc77 - e911 - a82c - 000d3ab182a9"},{"title": "Proposta di collaborazione","knowledgearticleviews": "0","description": "","knowledgearticleid": "ad6fe635 - dc77 - e911 - a82c - 000d3ab182a9"},{"title": "test con op 2 livddd","knowledgearticleviews": "0","description": "bla bla","knowledgearticleid": "d7e9f019 - 2ae5 - e911 - a841 - 000d3ab18325"},{"title": "test con op 2 liv","knowledgearticleviews": "0","description": "","knowledgearticleid": "d9e9f019 - 2ae5 - e911 - a841 - 000d3ab18325"},{"title": "Elenco Polizze Esistenti","knowledgearticleviews": "0","description": "","knowledgearticleid": "4389828d - d5e5 - e911 - a841 - 000d3ab18325"},{"title": "Elenco Polizze Esistenti","knowledgearticleviews": "0","description": "","knowledgearticleid": "072982d0 - d5e5 - e911 - a841 - 000d3ab18325"},{"title": "Accesso all\'Area Riservata","knowledgearticleviews": "0","description": "Il Cliente ha sbagliato l\'indirizzo di registrazione al sito New My Helvetia","knowledgearticleid": "e1c8d267 - d6e5 - e911 - a841 - 000d3ab18325"}]'; return makeFakeHttpGet(json, fnDone); } else { const urlToRequest = url + "/get-KnowledgeBaseByName?articleTitle=" + name + "&companyid=" + companyid; return makeHttpGet(urlToRequest, fnDone); } }; self.getUserAgencies = function () { return { userid: $("#currentuserid").val(), nodoHi: $("#nodoHi").val(), nodoHr: $("#nodoHr").val(), nodoHv: $("#nodoHv").val(), subNodoHi: $("#subnodoHi").val(), subNodoHr: $("#subnodoHr").val(), subNodoHv: $("#subnodoHv").val(), } }; }; Avanade.Hlv.PortalAgenti.Home = new function () { const self = this; var companyList = []; var blList = []; var blListToCheck1 = [855600000, 855600001, 855600003]; var blListToCheck2 = [855600009, 855600010, 999999999]; //999999999 value fittizio per il cerca var isFirstLoad = true; var countFirstLoad = 0; self.init = function () { var ag1 = { id: $("#nodoHi").val(), //label: $("#nodoHiName").val(), type: "node" }; var ag2 = { id: $("#nodoHr").val(), //label: $("#nodoHrName").val(), type: "node" }; var ag3 = { id: $("#nodoHv").val(), //label: $("#nodoHvName").val(), type: "node" }; var subag1 = { id: $("#subnodoHi").val(), //label: $("#subnodoHiName").val(), type: "subnode" }; var subag2 = { id: $("#subnodoHr").val(), //label: $("#subnodoHrName").val(), type: "subnode" }; var subag3 = { id: $("#subnodoHv").val(), //label: $("#subnodoHvName").val(), type: "subnode" }; $(".carousel-item:first-child").addClass("active"); $(".carousel-indicators li:first-child").addClass("active"); $(".entitylist").on("loaded", function () { $("#homeBody-ticket-section td[data-attribute='ticketnumber'] a").addClass("customLinkVoice"); $("#homeBody-ticket-section tr td:last-child").hide(); countFirstLoad++; if (isFirstLoad && countFirstLoad == 3) { $("#personalFilter").click(); isFirstLoad = false; } //self.personalCasesFilter(); }) $(".modal.fade").on("show.bs.modal", function () { $(".modal.fade").css("opacity", 1); $(".modal-dialog").css({ "top": "40px", "max-width": "1000px", "width": "1000px" }); $(".modal-content").css({ "border-radius": 0 }) }) $(".modal.fade").on("shown.bs.modal", function () { $(".modal-form.in .modal-content .modal-body iframe").on("load", function () { var ticketNumber = $(".modal-form.in .modal-content .modal-body iframe").contents().find("#ticketnumber")[0] != null ? $(".modal-form.in .modal-content .modal-body iframe").contents().find("#ticketnumber")[0].value : null; $(".modal-form.in .modal-header h4").html(""); if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(ticketNumber)) { var status = $(".modal-form.in .modal-content .modal-body iframe").contents().find("#statuscode")[0].innerText; $(".modal-form.in .modal-header").css({ "display": "block", "border-bottom": "none" }) $(".modal-form.in .modal-header h4").html('
Dettaglio Richiesta - ' + '' + ticketNumber + '' + '
Stato: ' + '' + status + '' + ''); $('.modal-form.in .modal-content .modal-body iframe').contents().find("tr:lt(2)").hide() //MODALE CREA COMMENTO DA CASI APERTI //$(".modal.fade.modal-form.modal-form-insert.in iframe").contents().find("td:lt(6)").hide() //$('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype1id_name").parent().parent().parent().hide(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype2id").val() == "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype2id_name").parent().parent().parent().hide(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype3id").val() == "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype3id_name").parent().parent().parent().hide(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype4id").val() == "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype4id_name").parent().parent().parent().hide(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype5id").val() == "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype5id_name").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#customerid_name").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_nodeid_name").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_subnodeid_name").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#caseorigincode").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_externalcasetypology").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_customerontheintermediaryspremises").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtamountrequired").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtmontescontibalance").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtreasonforrequest").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_amountrequired").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_montescontibalance").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_reasonforrequest").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcamontescontibalance").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_amountrequired").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcaamountrequired").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcareasonforrequest").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_montescontibalance").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_reasonforrequest").parent().parent().parent().hide(); var lastReqId = getLatReqTypeIdFromInputs(); var lastReqType = Avanade.Hlv.PortalAgenti.Common.getParentReqTypology(lastReqId); if (lastReqType != null && lastReqType.length > 0) { var particularCase = !Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(lastReqType[0].hlv_externalcasetypology) ? parseInt(lastReqType[0].hlv_externalcasetypology) : -1; var severityValue = lastReqType[0].hlv_severity_value; var severityLabel = lastReqType[0].hlv_severity_name; var serviceId = lastReqType[0].hlv_service_id; var serviceLabel = lastReqType[0].hlv_service_name; var customerontheintermediaryspremises = lastReqType[0].hlv_customerontheintermediaryspremises; switch (particularCase) { case 855600015://Sblocco Quietanzamneto break; case 855600014://Montesconti RCA if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtamountrequired").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtamountrequired").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtmontescontibalance").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtmontescontibalance").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtreasonforrequest").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtreasonforrequest").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_amountrequired").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_amountrequired").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_montescontibalance").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_montescontibalance").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_reasonforrequest").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_reasonforrequest").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcamontescontibalance").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcamontescontibalance").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcaamountrequired").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcaamountrequired").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcareasonforrequest").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcareasonforrequest").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_amountrequired").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_amountrequired").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_montescontibalance").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_montescontibalance").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_reasonforrequest").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_reasonforrequest").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt").is(":checked")) $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca").is(":checked")) $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi").is(":checked")) $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi").is(":checked")) $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi").parent().parent().parent().show(); break; } } } $(".modal-form.in .modal-content .modal-body iframe").contents().find(".modal.fade").on("shown.bs.modal", function () { alert("ciao") }) }) }) $("#optionset-nodo").hide(); $("#optionset-sottonodo").hide(); if ($("#roles :input").val() == "PI - Direzione") { var companies = Avanade.Hlv.PortalAgenti.Common.getCompanies(); if (companies != null) { companies.forEach(function (elem) { companyList.push({ id: elem.companyid, name: elem.companyname, type: "company", value: "1" }) }) } } else if ($("#roles :input").val() == "PI - Insurance Corner" || $("#roles :input").val() == "PI - SubAgente" || $("#roles :input").val() == "PI - Coll – SottoNodo Broker") { if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(subag1.id) && subag1.id != "/") { var ag1Res = Avanade.Hlv.PortalAgenti.Common.getCompany(subag1.id); if (ag1Res != null) { ag1Res.forEach(function (elem) { companyList.push({ id: elem.companyid, name: elem.companyname, type: "company", value: "1" }) }) } } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(subag2.id) && subag2.id != "/") { var ag2Res = Avanade.Hlv.PortalAgenti.Common.getCompany(subag2.id); if (ag2Res != null) { ag2Res.forEach(function (elem) { companyList.push({ id: elem.companyid, name: elem.companyname, type: "company", value: "2" }) }) } } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(subag3.id) && subag3.id != "/") { var ag3Res = Avanade.Hlv.PortalAgenti.Common.getCompany(subag3.id); if (ag3Res != null) { ag3Res.forEach(function (elem) { companyList.push({ id: elem.companyid, name: elem.companyname, type: "company", value: "3" }) }) } } } else { if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(ag1.id) && ag1.id != "/") { var ag1Res = Avanade.Hlv.PortalAgenti.Common.getCompany(ag1.id); if (ag1Res != null) { ag1Res.forEach(function (elem) { companyList.push({ id: elem.companyid, name: elem.companyname, type: "company", value: "1" }) }) } } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(ag2.id) && ag2.id != "/") { var ag2Res = Avanade.Hlv.PortalAgenti.Common.getCompany(ag2.id); if (ag2Res != null) { ag2Res.forEach(function (elem) { companyList.push({ id: elem.companyid, name: elem.companyname, type: "company", value: "2" }) }) } } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(ag3.id) && ag3.id != "/") { var ag3Res = Avanade.Hlv.PortalAgenti.Common.getCompany(ag3.id); if (ag3Res != null) { ag3Res.forEach(function (elem) { companyList.push({ id: elem.companyid, name: elem.companyname, type: "company", value: "3" }) }) } } } companyList.forEach(function (c) { var blRes = Avanade.Hlv.PortalAgenti.Common.getBusinessLine(c.id); if (blRes != null && blRes.length > 0) { blRes.forEach(function (b) { var position = blList.find(function (row) { return row == b.hlv_businessline_value }) if (!position) blList.push(parseInt(b.hlv_businessline_value)); }) } }) var row1count = 0; var row2count = 0; var classRow1 = ""; var classRow2 = ""; blListToCheck1.forEach(function (b) { if (blList.includes(b)) { $("#bl_" + b).show(); row1count++; } }) blListToCheck2.forEach(function (b) { if (blList.includes(b)) { $("#bl_" + b).show(); row2count++; } }) if (row1count > 0) { classRow1 = "col-md-" + (12 / row1count); blListToCheck1.forEach(function (b) { $("#bl_" + b).removeClass("col-md-4").addClass(classRow1); }) } if (row2count >= 0) { classRow2 = "col-md-" + (12 / (row2count + 1)); blListToCheck2.forEach(function (b) { $("#bl_" + b).removeClass("col-md-4").addClass(classRow2); }) } }; self.showNodeOptions = function () { var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var userId = userObj != null ? userObj.userid : null; if (userId == null) { return; } $('.input-group.entitylist-filter-option-text input[name="0"]').val(""); $('.input-group.entitylist-filter-option-text input[name="1"]').val(userId); $('.input-group.entitylist-filter-option-text input[name="2"]').val(""); $('.input-group.entitylist-filter-option-text input[name="3"]').val("aaa"); $('.input-group.entitylist-filter-option-text input[name="4"]').val(""); // $('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', true) // $('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="5"]').val(""); $("#optionset-nodo").show(); $("#optionset-sottonodo").hide(); $("#subNodeRequestDescription").hide(); $("#nodeRequestDescription").show(); $("#personalRequestDescription").hide(); $("#ticket-filter-option-nodo").val(0); $("#ticket-filter-option-sottonodo").val(0); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.showSubNodeOptions = function () { var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var userId = userObj != null ? userObj.userid : null; if (userId == null) { return; } var firstSubNode = $($("#ticket-filter-option-sottonodo option")[1]).attr('value') $('.input-group.entitylist-filter-option-text input[name="0"]').val(""); $('.input-group.entitylist-filter-option-text input[name="1"]').val(userId); // $('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="3"]').val(""); if ($("#roles :input").val() == "PI - Agente" || $("#roles :input").val() == "PI - Insurance Corner") { //$('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', true) $('.input-group.entitylist-filter-option-text input[name="5"]').val("aaa"); } else { $('.input-group.entitylist-filter-option-text input[name="2"]').val(firstSubNode); } $("#optionset-nodo").hide(); $("#optionset-sottonodo").show(); $("#subNodeRequestDescription").show(); $("#nodeRequestDescription").hide(); $("#personalRequestDescription").hide(); $("#ticket-filter-option-nodo").val(0); $("#ticket-filter-option-sottonodo").val(firstSubNode); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.goToArticle = function (objArray) { var titlekb = $("#carousel-kb .carousel-item.active .sub-title").text().replace(/(\r\n|\n|\r)/gm, "").trim(); if (titlekb != "") { window.location = "/articolidisupporto?titlekb=" + titlekb; } }; self.personalCasesFilter = function () { var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var userId = userObj != null ? userObj.userid : null; if (userId == null) { return; } $("#optionset-nodo").hide(); $("#optionset-sottonodo").hide(); $("#subNodeRequestDescription").hide(); $("#nodeRequestDescription").hide(); $("#personalRequestDescription").show(); $("#ticket-filter-option-nodo").val(0); $("#ticket-filter-option-sottonodo").val(0); $('.input-group.entitylist-filter-option-text input[name="0"]').val(userId); $('.input-group.entitylist-filter-option-text input[name="1"]').val(""); $('.input-group.entitylist-filter-option-text input[name="2"]').val(""); //$('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="3"]').val(""); //$('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="5"]').val(""); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.nodoCasesFilter = function () { //var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var nodo = $("#ticket-filter-option-nodo").val(); if (nodo == null || nodo == "0") { return; } $('.input-group.entitylist-filter-option-text input[name="0"]').val(""); $('.input-group.entitylist-filter-option-text input[name="1"]').val(nodo); $('.input-group.entitylist-filter-option-text input[name="2"]').val(""); //$('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', true) $('.input-group.entitylist-filter-option-text input[name="3"]').val("aaa"); //$('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="5"]').val(""); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.subNodoCasesFilter = function () { //var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var sottonodo = $("#ticket-filter-option-sottonodo").val(); if (sottonodo == null) { return; } $('.input-group.entitylist-filter-option-text input[name="0"]').val(""); $('.input-group.entitylist-filter-option-text input[name="1"]').val(""); $('.input-group.entitylist-filter-option-text input[name="2"]').val(sottonodo); //$('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="3"]').val(""); if ($("#roles :input").val() == "PI - Agente" || $("#roles :input").val() == "PI - Insurance Corner") { //$('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', true) $('.input-group.entitylist-filter-option-text input[name="5"]').val("aaa"); } else { $('.input-group.entitylist-filter-option-text input[name="2"]').val(sottonodo); } $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; var getLatReqTypeIdFromInputs = function () { var resid = ""; if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype5id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype5id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype4id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype4id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype3id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype3id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype2id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype2id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype1id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype1id").val() } }; }; Avanade.Hlv.PortalAgenti.News = new function () { const self = this; self.init = function () { $("#modal-dettaglio-news").on("show.bs.modal", function () { }) }; self.showModal = function (index) { var title = $("#news-title-" + index).html(); var desc = $("#news-desc-" + index).html(); $("#modal-dettaglio-news #modal-title").html(title); $("#modal-dettaglio-news #modalContent-news").html(desc); $("#modal-dettaglio-news").modal("show"); }; }; Avanade.Hlv.PortalAgenti.VisualizzaRichieste = new function () { const self = this; var isFirstLoad = true; var countFirstLoad = 0; self.init = function () { $(".carousel-item:first-child").addClass("active"); $(".carousel-indicators li:first-child").addClass("active"); $(".entitylist").on("loaded", function () { $("#richiesteBody-ticket-section td[data-attribute='ticketnumber'] a").addClass("customLinkVoice"); $("#richiesteBody-ticket-section tr td:last-child").hide(); countFirstLoad++; if (isFirstLoad && countFirstLoad == 3) { $("#personalFilter").click(); isFirstLoad = false; } }) $("#risultatiRicerca .entitylist").on("loaded", function () { // var countRecAttr = $('#SearchCountTextnull').attr('aria-label'); // if (countRecAttr == null){ // return; // } // var countRec = $('#SearchCountTextnull').attr('aria-label').split(' ')[0]; // if (isNaN(countRec)) { // countRec = 0; // } // $('#section-results-countRecords').text(countRec); }) $(".modal.fade").on("show.bs.modal", function () { $(".modal.fade").css("opacity", 1); $(".modal-dialog").css({ "top": "40px", "max-width": "1000px", "width": "1000px" }); $(".modal-content").css({ "border-radius": 0 }) }) $(".modal.fade").on("shown.bs.modal", function () { $(".modal-form.in .modal-content .modal-body iframe").on("load", function () { var ticketNumber = $(".modal-form.in .modal-content .modal-body iframe").contents().find("#ticketnumber")[0].value; $(".modal-form.in .modal-header h4").html(""); if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(ticketNumber)) { var status = $(".modal-form.in .modal-content .modal-body iframe").contents().find("#statuscode")[0].innerText; $(".modal-form.in .modal-header").css({ "display": "block", "border-bottom": "none" }) $(".modal-form.in .modal-header h4").html('
Dettaglio Richiesta - ' + '' + ticketNumber + '' + '
Stato: ' + '' + status + '' + ''); $('.modal-form.in .modal-content .modal-body iframe').contents().find("tr:lt(2)").hide(); //$('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype1id_name").parent().parent().parent().hide(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype2id").val() == "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype2id_name").parent().parent().parent().hide(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype3id").val() == "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype3id_name").parent().parent().parent().hide(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype4id").val() == "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype4id_name").parent().parent().parent().hide(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype5id").val() == "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype5id_name").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#customerid_name").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_nodeid_name").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_subnodeid_name").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#caseorigincode").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_externalcasetypology").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_customerontheintermediaryspremises").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtamountrequired").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtmontescontibalance").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtreasonforrequest").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_amountrequired").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_montescontibalance").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_reasonforrequest").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcamontescontibalance").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_amountrequired").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcaamountrequired").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcareasonforrequest").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_montescontibalance").parent().parent().parent().hide(); $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_reasonforrequest").parent().parent().parent().hide(); var lastReqId = getLatReqTypeIdFromInputs(); var lastReqType = Avanade.Hlv.PortalAgenti.Common.getParentReqTypology(lastReqId); if (lastReqType != null && lastReqType.length > 0) { var particularCase = !Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(lastReqType[0].hlv_externalcasetypology) ? parseInt(lastReqType[0].hlv_externalcasetypology) : -1; var severityValue = lastReqType[0].hlv_severity_value; var severityLabel = lastReqType[0].hlv_severity_name; var serviceId = lastReqType[0].hlv_service_id; var serviceLabel = lastReqType[0].hlv_service_name; var customerontheintermediaryspremises = lastReqType[0].hlv_customerontheintermediaryspremises; switch (particularCase) { case 855600015://Sblocco Quietanzamneto break; case 855600014://Montesconti RCA if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtamountrequired").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtamountrequired").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtmontescontibalance").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtmontescontibalance").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtreasonforrequest").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvtreasonforrequest").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_amountrequired").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_amountrequired").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_montescontibalance").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_montescontibalance").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_reasonforrequest").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi_reasonforrequest").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcamontescontibalance").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcamontescontibalance").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcaamountrequired").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcaamountrequired").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcareasonforrequest").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rcareasonforrequest").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_amountrequired").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_amountrequired").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_montescontibalance").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_montescontibalance").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_reasonforrequest").val() != "") $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi_reasonforrequest").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt").is(":checked")) $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca").is(":checked")) $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi").is(":checked")) $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_rca_svi").parent().parent().parent().show(); if ($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi").is(":checked")) $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_cvt_svi").parent().parent().parent().show(); break; } } } }) }) $('#richiesteBody-ticket-section-results [name="0"]').val(""); $('#richiesteBody-ticket-section-results [name="1"]').val(""); $('#richiesteBody-ticket-section-results [name="2"]').prop('type', 'text'); $('#richiesteBody-ticket-section-results [name="2"]').val(""); $('#richiesteBody-ticket-section-results [name="3"]').prop('type', 'text'); $('#richiesteBody-ticket-section-results [name="3"]').val(""); $('#richiesteBody-ticket-section-results [name="4"]').val(""); $('#richiesteBody-ticket-section-results [name="5"]').val(""); $('#richiesteBody-ticket-section-results [name="6"]').val(""); $("#optionset-nodo").hide(); $("#optionset-sottonodo").hide(); }; self.closeModal = function () { $("#modal-dettaglio-richiesta").modal("hide"); }; self.chiudiRicercaTicket = function () { $(".ricerca-ticket").hide() }; self.openModalDettaglioRichiesteLavorazione = function () { $("#modal-title").text("Richieste in lavorazione"); $("#openPersonalCases").hide(); $("#closedPersonalCases").hide(); $("#openNodeCases").hide(); $("#closedNodeCases").hide(); $("#openSubNodeCases").hide(); $("#closedSubNodeCases").hide(); $("#inProgressPersonalCases").show(); $("#inProgressNodeCases").show(); $("#inProgressSubNodeCases").show(); $("#totale-title").text("Totale richieste in lavorazione"); $("#totalOpenRecords").hide(); $("#totalClosedRecords").hide(); $("#totalRecordInProgress").show(); $("#modal-dettaglio-count-richieste").modal("show"); }; self.openModalDettaglioRichiesteAperte = function () { $("#modal-title").text("Richieste aperte"); $("#closedPersonalCases").hide(); $("#inProgressPersonalCases").hide(); $("#inProgressNodeCases").hide(); $("#closedNodeCases").hide(); $("#inProgressSubNodeCases").hide(); $("#closedSubNodeCases").hide(); $("#openPersonalCases").show(); $("#openNodeCases").show(); $("#openSubNodeCases").show(); $("#totale-title").text("Totale richieste aperte"); $("#totalOpenRecords").show(); $("#totalClosedRecords").hide(); $("#totalRecordInProgress").hide(); $("#modal-dettaglio-count-richieste").modal("show"); }; self.openModalDettaglioRichiesteChiuse = function () { $("#modal-title").text("Richieste chiuse"); $("#openPersonalCases").hide(); $("#inProgressPersonalCases").hide(); $("#inProgressNodeCases").hide(); $("#openNodeCases").hide(); $("#inProgressSubNodeCases").hide(); $("#openSubNodeCases").hide(); $("#closedPersonalCases").show(); $("#closedNodeCases").show(); $("#closedSubNodeCases").show(); $("#totale-title").text("Totale richieste chiuse"); $("#totalOpenRecords").hide(); $("#totalClosedRecords").show(); $("#totalRecordInProgress").hide(); $("#modal-dettaglio-count-richieste").modal("show"); }; self.showSearchSection = function () { $(".entitylist").on("loaded", function () { $(".customLinkVoice").css("color", hlvConst.colors.green) $("#customLinkVoiceHrefSearchResults").css("color", hlvConst.colors.green) }) $(".changingFont").css("color", hlvConst.colors.green) $(".sort-enabled a").addClass("sort-green"); $(".sort-enabled a").removeClass("sort-red"); $(".sort-enabled a").removeClass("sort-purple"); $(".customLinkVoice").css("color", hlvConst.colors.green) $(".ticketFilter-option").removeClass("ticketFilter-selected"); $(".ticketFilter-option-cerca").addClass("ticketFilter-selected"); $('#richiesteBody-ticket-section-results [name="0"]').val(""); $('#richiesteBody-ticket-section-results [name="1"]').val(""); $('#richiesteBody-ticket-section-results [name="2"]').val(""); $('#richiesteBody-ticket-section-results [name="3"]').val(""); $('#richiesteBody-ticket-section-results [name="4"]').val(""); $('#richiesteBody-ticket-section-results [name="5"]').val(""); $('#richiesteBody-ticket-section-results [name="6"]').val(""); $("#richiesteBody-ticket-section-general").hide(); $("#subNodeRequestDescription").hide(); $("#nodeRequestDescription").hide(); $("#personalRequestDescription").hide(); $("#richiesteBody-ticket-section-results").show(); self.filtersReset(); }; self.apriRichiestaLavorazione = function () { $("#richiesteBody-ticket-section").hide() $("#richiesta-lavorazione-body").show() }; self.tornaIndietroRichiestaLavorazione = function () { $("#richiesta-lavorazione-body").hide(); $("#richiesteBody-ticket-section").show() }; self.apriRicercaTicket = function () { $(".changingFont").css("color", hlvConst.colors.green); $(".sort-enabled a").addClass("sort-green"); $(".sort-enabled a").removeClass("sort-red"); $(".sort-enabled a").removeClass("sort-purple"); $(".customLinkVoice").css("color", hlvConst.colors.green); $(".ricerca-ticket").show(); }; self.searchTab = function () { var inputText = $(".esegui-ricerca input").val(); if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(inputText)) { inputText = "*" + inputText; } $(".input-group.pull-left.view-search.entitylist-search input").val(inputText); $(".input-group.pull-left.view-search.entitylist-search button").click(); }; self.filtersReset = function () { $(".esegui-ricerca input").val(""); self.searchTab(); $("#stato_checkbox_select select").val(""); $("#lavoratoda-select select").val(""); $("#incaricoa-select select").val(""); $("#codicesottonodo-select select").val(""); $("input[id='date-filter-custom-from'], input[id='date-filter-custom-to']").val("") $('#richiesteBody-ticket-section-results [name="2"]').val(""); $('#richiesteBody-ticket-section-results [name="3"]').val(""); self.applyFilters(); }; self.applyFilters = function () { var stato = $("#stato_checkbox_select select").val(); var lavoratoDa = $("#lavoratoda-select select").val(); var inCaricoa = $("#incaricoa-select select").val(); var codSottonodo = $("#codicesottonodo-select select").val(); $(".input-group.entitylist-filter-option-text #dropdown_0").val(stato); if (Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(lavoratoDa) || lavoratoDa == "0") { lavoratoDa = ""; } $(".input-group.entitylist-filter-option-text #5").val(lavoratoDa); if (Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(inCaricoa) || inCaricoa == "0") { inCaricoa = ""; } if ($("#roles :input").val() == "PI - Direzione") { var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var userId = userObj != null ? userObj.userid : null; inCaricoa = userId; } $(".input-group.entitylist-filter-option-text #6").val(inCaricoa); if (Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(codSottonodo) || codSottonodo == "0") { codSottonodo = ""; } $("#richiesteBody-ticket-section-results .input-group.entitylist-filter-option-text #4").val(codSottonodo); var dal = $("#date-filter-custom-from").val(); var al = $("#date-filter-custom-to").val(); if (Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(al)) { al = $("input[id='date-filter-custom-to']").val("") $('#richiesteBody-ticket-section-results [name="3"]').val(""); } else { $('#richiesteBody-ticket-section-results [name="3"]').val(moment(al).format("MM/DD/YYYY")); } if (Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(dal)) { dal = $("input[id='date-filter-custom-from']").val("") $('#richiesteBody-ticket-section-results [name="2"]').val(""); } else { $('#richiesteBody-ticket-section-results [name="2"]').val(moment(dal).format("MM/DD/YYYY")); } $('#richiesteBody-ticket-section-results [name="1"]').val(""); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.hideTicketData = function () { if (!$(".dati-richiesta-lavorazione").is(":hidden")) { $(".dati-richiesta-bar svg").attr('width', '24.773').attr('height', '15.149').attr('viewBox', '0 0 30.773 21.149'); $(".dati-richiesta-bar svg path").attr('transform', 'translate(38.655 32.4), rotate(180)'); $(".dati-richiesta-lavorazione").hide() } else if ($(".dati-richiesta-lavorazione").is(":hidden")) { $(".dati-richiesta-bar svg").attr('width', '15.149').attr('height', '24.773').attr('viewBox', '0 0 21.149 30.773'); $(".dati-richiesta-bar svg path").attr('transform', 'translate(32.4 -7.882) rotate(90)'); $(".dati-richiesta-lavorazione").show() } }; self.hideInteraction = function () { if (!$(".richiesta-lavorazione-interazione").is(":hidden")) { $(".interazione-bar svg").attr('width', '24.773').attr('height', '15.149').attr('viewBox', '0 0 30.773 21.149'); $(".interazione-bar svg path").attr('transform', 'translate(38.655 32.4), rotate(180)'); $(".richiesta-lavorazione-interazione").hide() } else if ($(".richiesta-lavorazione-interazione").is(":hidden")) { $(".interazione-bar svg").attr('width', '15.149').attr('height', '24.773').attr('viewBox', '0 0 21.149 30.773'); $(".interazione-bar svg path").attr('transform', 'translate(32.4 -7.882) rotate(90)'); $(".richiesta-lavorazione-interazione").show() } }; self.personalCasesFilter = function () { var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var userId = userObj != null ? userObj.userid : null; if (userId == null) { return; } $("#optionset-nodo").hide(); $("#optionset-sottonodo").hide(); $("#subNodeRequestDescription").hide(); $("#nodeRequestDescription").hide(); $("#personalRequestDescription").show(); $("#ticket-filter-option-nodo").val(0); $("#ticket-filter-option-sottonodo").val(0); $('[name="0"]').val(""); $('#richiesteBody-ticket-section-general [name="0"]').val(userId); //$('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="3"]').val(""); //$('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="5"]').val(""); $('[name="1"]').val(""); $('[name="2"]').val(""); $('[name="3"]').val(""); $('[name="4"]').val(""); $('[name="5"]').val(""); $('[name="6"]').val(""); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.nodoCasesFilter = function () { //var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var nodo = $("#ticket-filter-option-nodo").val(); if (nodo == null || nodo == "0") { return; } $('.input-group.entitylist-filter-option-text input[name="0"]').val(""); $('.input-group.entitylist-filter-option-text input[name="1"]').val(nodo); $('.input-group.entitylist-filter-option-text input[name="2"]').val(""); //$('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', true) $('.input-group.entitylist-filter-option-text input[name="3"]').val("aaa"); //$('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="5"]').val(""); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.subNodoCasesFilter = function () { //var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var sottonodo = $("#ticket-filter-option-sottonodo").val(); if (sottonodo == null) { return; } $('[name="0"]').val(""); if ($("#roles :input").val() == "PI - Agente" || $("#roles :input").val() == "PI - Insurance Corner") { //$('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', true) $('.input-group.entitylist-filter-option-text input[name="5"]').val("aaa"); } else { $('#richiesteBody-ticket-section-general [name="2"]').val(sottonodo); $('.input-group.entitylist-filter-option-text input[name="5"]').val(""); } //$('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="3"]').val(""); $('[name="1"]').val(""); $('[name="3"]').val(""); $('[name="4"]').val(""); $('[name="5"]').val(""); $('[name="6"]').val(""); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.showNodeOptions = function () { var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var userId = userObj != null ? userObj.userid : null; if (userId == null) { return; } $('[name="0"]').val(""); $('[name="1"]').val(userId); $('[name="2"]').val(""); $('[name="3"]').val(""); $('[name="4"]').val(""); $('[name="5"]').val(""); $('[name="6"]').val(""); //$('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', true) $('.input-group.entitylist-filter-option-text input[name="3"]').val("aaa"); $("#optionset-nodo").show(); $("#optionset-sottonodo").hide(); $("#subNodeRequestDescription").hide(); $("#nodeRequestDescription").show(); $("#personalRequestDescription").hide(); $("#ticket-filter-option-nodo").val(0); $("#ticket-filter-option-sottonodo").val(0); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; self.showSubNodeOptions = function () { var userObj = Avanade.Hlv.PortalAgenti.Common.getUserAgencies(); var userId = userObj != null ? userObj.userid : null; if (userId == null) { return; } var firstSubNode = $($("#ticket-filter-option-sottonodo option")[1]).attr('value') $('[name="0"]').val(""); $('[name="1"]').val(userId); $('[name="2"]').val(firstSubNode); $('[name="3"]').val(""); $('[name="4"]').val(""); $('[name="5"]').val(""); $('[name="6"]').val(""); $("#optionset-nodo").hide(); $("#optionset-sottonodo").show(); $("#subNodeRequestDescription").show(); $("#nodeRequestDescription").hide(); $("#personalRequestDescription").hide(); //$('.entitylist-filter-option .checkbox input[name="3"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="3"]').val(""); //$('.entitylist-filter-option .checkbox input[name="5"]').prop('checked', false) $('.input-group.entitylist-filter-option-text input[name="5"]').val("ss"); $("#ticket-filter-option-nodo").val(0); $("#ticket-filter-option-sottonodo").val(firstSubNode); $(".btn.btn-default.btn-entitylist-filter-submit").click(); }; var getLatReqTypeIdFromInputs = function () { var resid = ""; if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype5id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype5id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype4id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype4id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype3id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype3id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype2id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype2id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype1id").val())) { return $('.modal-form.in .modal-content .modal-body iframe').contents().find("#hlv_requesttype1id").val() } } }; Avanade.Hlv.PortalAgenti.VisualizzaRichieste.Lavorazione = new function () { const self = this; self.init = function () { var id = $("#incident-regarding-id").val(); var title = $("#incident-regarding-title").val(); var field = "#regardingobject"; $(field + "id").val(id); $(field + "id_entityname").val("incident"); $(field + "id_name").val(title); var cell = $(field + "id_name").parent().parent().parent(); cell.hide(); field = "#subject"; var op = $("#currentuserfullname").val(); var tn = "Interazione"; var subject = tn + " - " + op; $(field).val(subject); cell = $(field).parent().parent().parent(); cell.hide(); field = "#hlv_author"; var idAuthor = $("#currentuserid").val(); $(field).val(idAuthor); cell = $(field).parent().parent().parent(); cell.hide(); $('.dati-richiesta-lavorazione .form-readonly.entity-form').find("tr:lt(2)").hide(); $('.dati-richiesta-lavorazione') if ($(".dati-richiesta-lavorazione #hlv_requesttype2id").val() == "") $(".dati-richiesta-lavorazione #hlv_requesttype2id_name").parent().parent().parent().hide(); if ($(".dati-richiesta-lavorazione #hlv_requesttype3id").val() == "") $(".dati-richiesta-lavorazione #hlv_requesttype3id_name").parent().parent().parent().hide(); if ($(".dati-richiesta-lavorazione #hlv_requesttype4id").val() == "") $(".dati-richiesta-lavorazione #hlv_requesttype4id_name").parent().parent().parent().hide(); if ($(".dati-richiesta-lavorazione #hlv_requesttype5id").val() == "") $(".dati-richiesta-lavorazione #hlv_requesttype5id_name").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #customerid_name").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_nodeid_name").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_subnodeid_name").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #caseorigincode").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_externalcasetypology").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_customerontheintermediaryspremises").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_cvt").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_cvtamountrequired").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_cvtmontescontibalance").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_cvtreasonforrequest").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_cvt_svi_amountrequired").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_cvt_svi_montescontibalance").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_cvt_svi_reasonforrequest").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_cvt_svi").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_rca").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_rcamontescontibalance").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_rca_svi_amountrequired").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_rca_svi").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_rcaamountrequired").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_rcareasonforrequest").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_rca_svi_montescontibalance").parent().parent().parent().hide(); $(".dati-richiesta-lavorazione #hlv_rca_svi_reasonforrequest").parent().parent().parent().hide(); var lastReqId2 = getLatReqTypeIdFromInputsInPage(); var lastReqType2 = Avanade.Hlv.PortalAgenti.Common.getParentReqTypology(lastReqId2); if (lastReqType2 != null && lastReqType2.length > 0) { var particularCase = !Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty(lastReqType2[0].hlv_externalcasetypology) ? parseInt(lastReqType2[0].hlv_externalcasetypology) : -1; var severityValue = lastReqType2[0].hlv_severity_value; var severityLabel = lastReqType2[0].hlv_severity_name; var serviceId = lastReqType2[0].hlv_service_id; var serviceLabel = lastReqType2[0].hlv_service_name; var customerontheintermediaryspremises = lastReqType2[0].hlv_customerontheintermediaryspremises; switch (particularCase) { case 855600015://Sblocco Quietanzamneto break; case 855600014://Montesconti RCA if ($(".dati-richiesta-lavorazione #hlv_cvtamountrequired").val() != "") $(".dati-richiesta-lavorazione #hlv_cvtamountrequired").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_cvtmontescontibalance").val() != "") $(".dati-richiesta-lavorazione #hlv_cvtmontescontibalance").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_cvtreasonforrequest").val() != "") $(".dati-richiesta-lavorazione #hlv_cvtreasonforrequest").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_cvt_svi_amountrequired").val() != "") $(".dati-richiesta-lavorazione #hlv_cvt_svi_amountrequired").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_cvt_svi_montescontibalance").val() != "") $(".dati-richiesta-lavorazione #hlv_cvt_svi_montescontibalance").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_cvt_svi_reasonforrequest").val() != "") $(".dati-richiesta-lavorazione #hlv_cvt_svi_reasonforrequest").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_rcamontescontibalance").val() != "") $(".dati-richiesta-lavorazione #hlv_rcamontescontibalance").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_rcaamountrequired").val() != "") $(".dati-richiesta-lavorazione #hlv_rcaamountrequired").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_rcareasonforrequest").val() != "") $(".dati-richiesta-lavorazione #hlv_rcareasonforrequest").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_rca_svi_amountrequired").val() != "") $(".dati-richiesta-lavorazione #hlv_rca_svi_amountrequired").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_rca_svi_montescontibalance").val() != "") $(".dati-richiesta-lavorazione #hlv_rca_svi_montescontibalance").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_rca_svi_reasonforrequest").val() != "") $(".dati-richiesta-lavorazione #hlv_rca_svi_reasonforrequest").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_cvt").is(":checked")) $(".dati-richiesta-lavorazione #hlv_cvt").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_rca").is(":checked")) $(".dati-richiesta-lavorazione #hlv_rca").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_rca_svi").is(":checked")) $(".dati-richiesta-lavorazione #hlv_rca_svi").parent().parent().parent().show(); if ($(".dati-richiesta-lavorazione #hlv_cvt_svi").is(":checked")) $(".dati-richiesta-lavorazione #hlv_cvt_svi").parent().parent().parent().show(); break; } } setDragAndDrop(); } var getLatReqTypeIdFromInputsInPage = function () { var resid = ""; if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($(".dati-richiesta-lavorazione #hlv_requesttype5id").val())) { return $(".dati-richiesta-lavorazione #hlv_requesttype5id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($(".dati-richiesta-lavorazione #hlv_requesttype4id").val())) { return $(".dati-richiesta-lavorazione #hlv_requesttype4id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($(".dati-richiesta-lavorazione #hlv_requesttype3id").val())) { return $(".dati-richiesta-lavorazione #hlv_requesttype3id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($(".dati-richiesta-lavorazione #hlv_requesttype2id").val())) { return $(".dati-richiesta-lavorazione #hlv_requesttype2id").val() } if (!Avanade.Hlv.PortalAgenti.Common.isStringNullOrEmpty($(".dati-richiesta-lavorazione #hlv_requesttype1id").val())) { return $(".dati-richiesta-lavorazione #hlv_requesttype1id").val() } } var getDataTransfer = function () { try { return new DataTransfer(); } catch (e) { return null; } }; var setDragAndDrop = function () { var inputFile = $("input[type='file']"); var parentInputFile = inputFile.parent(); inputFile.addClass("uxc-m-multi-file-upload__input uxc-js-m-multi-file-upload__input"); parentInputFile.append("