PageSourceSearch

https://sistema.yacamba.com/assets/utils-DZkElfdF.js

js yacamba.com collected 2026-09-24 11:06:33 UTC 11,401 bytes, 1 lines download raw bytes

1import{eO as i,dn as r}from"./index-DfEzlclk.js";async function S(e){const t={name:e.get("name")};return await fetch("https://saasbackend.yacamba.com/api/services/store-category",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})}async function $(e){const t=[];for(const[o,a]of e.entries())o==="service"&&t.push(a);const s={name:e.get("name"),description:e.get("description"),price:e.get("price"),service:t};return await fetch("https://saasbackend.yacamba.com/api/services/store-package",{method:"POST",body:JSON.stringify(s),headers:{Authorization:"Bearer "+r.get("token")}})}async function z(e){const t={name:e.get("name"),description:e.get("description"),category_id:e.get("categories_id")!==""||e.get("categories_id")!==null?e.get("categories_id"):null,sat_id:e.get("sat_id"),unit:e.get("unidadesDeMedida"),color:e.get("color"),price:parseFloat(e.get("price")),code:e.get("code"),sale:e.get("sale")=="on"?1:0,shopping:e.get("shopping")=="on"?1:0,cost_center_id:e.get("cost_center_id")!==""||e.get("cost_center_id")!==null?e.get("cost_center_id"):null,price_list:e.get("price_list_id")!==""||e.get("price_list_id")!==null?e.get("price_list_id"):null,bar_code:e.get("barcode")},s=e.get("general_info");
1s&&(t.general_info=JSON.parse(s));const n=new FormData;n.append("info",JSON.stringify(t));const o=e.get("image");return o&&o instanceof File&&o.size>0&&n.append("image",o),(await fetch("https://saasbackend.yacamba.com/api/services/save-principal-information-service",{method:"POST",body:n,headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function A(e){return(await fetch("https://saasbackend.yacamba.com/api/services/save-general-information-service",{method:"POST",body:e,headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function B(e){const t={service_id:e.get("info_id"),users:JSON.parse(e.get("users"))};return(await fetch("https://saasbackend.yacamba.com/api/services/save-service-user",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function O(e){const t={service_id:e.get("service_id"),name:e.get("title"),description:e.get("description"),color:e.get("color")};return(await fetch("https://saasbackend.yacamba.com/api/services/save-service-process",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function P(e){const t={service_id:e.get("info_id"),name:e.get("name"),description:e.get("description"),category_id:e.get("categories_id"),sat_id:e.get("sat_id"),color:e.get("color"),price:parseFloat(e.get("price")),code:e.get("code"),sale:e.get("sale")=="on"?1:0,shopping:e.get("shopping")=="on"?1:0,cost_center_id:e.get("cost_center_id"),price_list:e.get("price_list_id"),bar_code:e.get("barcode"),unit:e.get("unidadesDeMedida")},s=e.get("general_info");
1s&&(t.general_info=JSON.parse(s));const n=new FormData;n.append("info",JSON.stringify(t));const o=e.get("image");return o&&o instanceof File&&o.size>0&&n.append("image",o),(await fetch("https://saasbackend.yacamba.com/api/services/edit-principal-information-service",{method:"POST",body:n,headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function j(e){return(await fetch("https://saasbackend.yacamba.com/api/services/edit-general-information-service",{method:"POST",body:e,headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function T(e){const t={service_user:e.get("service_user"),responsible:e.get("responsible")};return(await fetch("https://saasbackend.yacamba.com/api/services/edit-service-user",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function N(e){const t={service_step_id:e.get("service_step_id"),last_step:e.get("last_step"),name:e.get("title"),description:e.get("description"),color:e.get("color")};return(await fetch("https://saasbackend.yacamba.com/api/services/edit-service-process",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function R(e){const t={service_user:e.get("service_user")};return(await fetch("https://saasbackend.yacamba.com/api/services/destroy-service-user",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function J(e){const t={service_step_id:e.get("service_step_id")};return(await fetch("https://saasbackend.yacamba.com/api/services/destroy-service-process",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function C(e){const t=e.get("service_id");return(await fetch(`https://saasbackend.yacamba.com/api/services/destroy-service/${t}`,{headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function f(e={}){try{const t=new URLSearchParams(e).toString();return(await fetch(`https://saasbackend.yacamba.com/api/services/get-services?${t}`,{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function v(e){try{return(await fetch(`https://saasbackend.yacamba.com/api/services/get-service/${e}`,{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function p(){try{return(await fetch("https://saasbackend.yacamba.com/api/organization/get-users",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function g(){try{return(await fetch("https://saasbackend.yacamba.com/api/accounting/get-cost-center",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Ups",{status:500})}}async function h(){try{return(await fetch("https://saasbackend.yacamba.com/api/inventory/get-price-lists",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function c(){try{return(await fetch("https://saasbackend.yacamba.com/api/services/get-categories",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function b(){try{return(await fetch("https://saasbackend.yacamba.com/api/services/get-packages",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function w(){try{return(await fetch("https://saasbackend.yacamba.com/api/services/get-categories-with-services",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function k(){try{return(await fetch("https://saasbackend.yacamba.com/api/organization/get-areas",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function d(){try{return(await fetch("https://saasbackend.yacamba.com/api/accounting/get-taxes",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function _(){try{return(await fetch("https://saasbackend.yacamba.com/api/services/get-next-service-code",{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function D(){const[e,t,s,n,o,a]=await Promise.all([c(),g(),h(),p(),_(),d()]);return i({categories:e,costCenter:t,priceList:s,users:n,next_code:o,taxes:a})}async function F(){const[e,t,s,n]=await Promise.all([f(),c(),b(),w()]);return i({services:e,categories:t,packages:s,categoriesServices:n})}async function x({params:e}){const t=e.id,[s,n,o,a,u,y,m]=await Promise.all([v(t),c(),g(),h(),p(),k(),d()]);return i({servicesDetails:s,categories:n,costCenter:o,priceList:a,users:u,areas:y,taxes:m})}
1async function I(e){const t={category_id:e.get("category_id"),service:e.get("service")};return await fetch("https://saasbackend.yacamba.com/api/services/add-category-service",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})}async function L(e){let t=e.get("category_id");try{return(await fetch(`https://saasbackend.yacamba.com/api/services/destroy-category/${t}`,{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function U(e){let t=e.get("service_id");try{return(await fetch(`https://saasbackend.yacamba.com/api/services/destroy-category-service/${t}`,{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function G(e){const t={category_id:e.get("category_id"),name:e.get("name"),description:e.get("description")};return await fetch("https://saasbackend.yacamba.com/api/services/edit-category",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})}async function E({params:e}){const t=e.id;try{return(await fetch(`https://saasbackend.yacamba.com/api/services/get-category/${t}`,{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function M(e){const t={package_id:e.get("package_id"),service_id:e.get("service_id")};return(await fetch("https://saasbackend.yacamba.com/api/services/edit-packages-services",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})).json()}async function q(e){const t=e.get("package_id"),s=e.get("service_id");try{return(await fetch(`https://saasbackend.yacamba.com/api/services/destroy-package-service/${t}/${s}`,{headers:{Authorization:"Bearer "+r.get("token"),Accept:"application/json"}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function H({params:e}){const t=e.id;try{return(await fetch(`https://saasbackend.yacamba.com/api/services/show-package/${t}`,{headers:{Authorization:"Bearer "+r.get("token")}})).json()}catch{return new Response("Something went wrong...",{status:500})}}async function K(e){const t={package_id:e.get("package_id"),name:e.get("name"),description:e.get("description"),price:e.get("price")};return await fetch("https://saasbackend.yacamba.com/api/services/edit-packages",{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+r.get("token")}})}async function Q(e){const t=new FormData;return t.append("document_import",e.get("document_import")),(await fetch("https://saasbackend.yacamba.com/api/services/import-services",{method:"POST",body:t,headers:{Authorization:"Bearer "+r.get("token")}})).json()}export{C as DestroyService,J as DestroytProcessTab,R as DestroytServiceUserTab,N as EditProcessTab,T as EditServiceUserTab,Q as ImportServices,E as ReadCategory,I as addCategoryService,M as addPackageService,L as destroyCategory,q as destroySelectedServices,U as destroyServiceCategory,G as editCategory,K as editPackage,k as getAreas,c as getCategories,w as getCategoriesAndServices,H as getComboById,g as getCostCenter,_ as getNextServiceCode,b as getPackages,h as getPriceList,v as getServiceById,f as getServices,d as getTaxes,p as getUsers,D as multiLoaderServiceGeneral,F as multiLoaderServiceGeneral2,x as multiLoaderServiceGeneralDetails,S as saveCategory,A as saveNewGeneralTab,O as saveNewProcess,z as saveNewService,B as saveNewUsersTab,$ as savePackage,j as updateGeneralTab,P as updatePrincipalTab};

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