PageSourceSearch

https://tripwip.app/_next/static/chunks/pages/app/driver/notifications-f67ea16353d85554.js

js tripwip.app collected 2026-10-02 15:36:57 UTC 6,092 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3471503d-000d-4eb8-b482-539357995fe1",e._sentryDebugIdIdentifier="sentry-dbid-3471503d-000d-4eb8-b482-539357995fe1")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7590,1752],{11752:function(e,t,n){e.exports=n(17500)},87935:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/driver/notifications",function(){return n(84043)}])},63774:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var r=n(85893);n(67294);var i=n(20818);function s(e,t,n,s){let a=(0,i.Ew)(t),c=n(`${e}.${a}.title`),o=n(`${e}.${a}.text`,{user:s}),l=e=>(0,r.jsx)("p",{className:"text-gray-700",children:e});return{title:c,renderText:()=>l(o)}}},1051:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(85893),i=n(67294),s=n(25675),a=n.n(s),c=(0,n(13077).Z)((0,r.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),o=n(44872),l=n(99604),u=n(24902),d=n(26886),f=n(44265),p=n(6457),x=n(2689);function m({notification:e}){let{isGetTripNotificationDto:t,isGetCarNotificationDto:n}={isGetTripNotificationDto:function(e){return e&&"trip"in e},isGetCarNotificationDto:function(e){return e&&"car"in e}},{profile:i,event:s}=e,m=l.UW[i]?.[s],h=m?.title||"Notification",g=new Date(e.createdAt),y=(0,o.WU)(g,"dd/MM/yyyy"),{user:b}=(0,f.a)(),j=e.user.profileImage||"/no_pfp.png";async function N(){await (0,u.G)(e?.id)}n(e)&&(j=e.car?.carPhotos[0]?.uri||"/empty-car.png"),t(e)&&(j=e.profile===l.Bk?e.trip?.driver?.profileImage?.uri||"/no_pfp.png":e.profile===l.$f?e.trip?.car?.user?.profileImage?.uri||"/no_pfp.png":e.trip?.car?.carPhotos[0]?.uri||"/no-car.png");let{operation:v}=(0,p.Z)({asyncFunction:N,onSuccess:()=>{b&&(0,x.T)(d.Cm(e?.id,b.type))}});return(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex cursor-pointer items-center",onClick:v,children:[(0,r.jsx)("div",{className:"relative h-[56px] w-[56px]",children:(0,r.jsx)(a(),{src:j,alt:"User avatar",fill:!0,sizes:"56px",className:"rounded-full",style:{objectFit:"cover"}},`image${e.id}`)},`imagediv${e.id}`),(0,r.jsxs)("div",{className:"pl-[24px]",children:[(0,r.jsx)("p",{children:h},`text${e.id}`),(0,r.jsx)("p",{className:"text-[14px] text-custom-gray-700",children:y},`date${e.id}`)]})]},`cardcontainer${e.id}`),(0,r.jsx)(c,{onClick:()=>(0,u.G)(e.id),className:"cursor-pointer"},`button${e.id}`)]},`whole${e.id}`)}function h({notifications:e}){let t=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],n=(0,i.useRef)(-1),s=(0,i.useRef)(-1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h1",{className:"mb-5 text-2xl font-semibold",children:"Notificaciones"}),e.map((e,i)=>{let{showMonth:a,newYear:c,monthString:o}=function(e){let r=e.getMonth(),i=e.getFullYear(),a=r!==n.current,c=i!==s.current;return(a||c)&&(n.current=r,s.current=i),{showMonth:a,newYear:c,monthString:t[r]}}(new Date(e.createdAt));return(0,r.jsxs)("div",{children:[i>0&&(0,r.jsxs)("div",{className:"relative my-4 flex items-center",children:[(0,r.jsx)("hr",{className:"flex-grow border-t border-custom-gray-300"},`separator${e.id}`),(a||c)&&(0,r.jsx)("p",{className:"absolute left-1/2 -translate-x-1/2 transform bg-white px-2 text-sm text-custom-gray-400",children:o},`month${e.id}`)]}),(0,r.jsx)(m,{notification:e},e.id)]},`container${e.id}`)}),0===e.length&&(0,r.jsx)("div",{className:"flex h-[150px] w-full items-center justify-center rounded-lg border border-custom-gray-300",children:(0,r.jsx)("p",{className:"font-semibold text-custom-gray-600",children:"\xa1Est\xe1s al d\xeda con tus notificaciones!"})})]})}n(63774),n(12489);var g=n(94016);function y(){return(0,r.jsx)("div",{className:"min-h-fullscreen-with-header-and-footer bg-white px-6 md:px-16 2xl:px-24",children:(0,r.jsxs)("div",{className:"mx-auto py-8 md:w-7/12",children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(g.lm,{})}),(0,r.jsx)(h,{notifications:[]})]})})}},6457:function(e,t,n){"use strict";var r=n(67294),i=n(95049),s=n(93682),a=n(74368),c=n(39424),o=n(44265);t.Z=({asyncFunction:e,onSuccess:t,onError:n,hideErrorModal:l,displaySuccessModal:u,displaySuccessToast:d,dontShowErrorToast:f=!1})=>{let{showErrorModal:p}=(0,i.V)(),{showSuccessModal:x}=(0,s.E)(),{triggerToast:m}=(0,a.p)(),{user:h}=(0,o.a)(),[g,y]=(0,r.useState)(!1),[b,j]=(0,r.useState)(null),[N,v]=(0,r.useState)(null);return{operation:(0,r.useCallback)(async(...r)=>{y(!0),j(null),v(null);try{let n=await e(...r);v(n),t&&t(n),u&&x(),d&&m("Acci\xf3n realizada con \xe9xito","success")}catch(t){j(t),h&&c.av({id:h.id,email:h.email,username:h.given_name,type:h.type}),c.Tb(t,{contexts:{asyncOperation:{functionName:e||"anonymous",args:r},additionalContext:{userId:h?.id,userEmail:h?.email,userType:h?.type}}}),n&&n(t),l||p(),d&&!f&&m("Error al realizar la acci\xf3n","error")}finally{y(!1)}},[e,t,u,x,d,m,n,l,f,p]),isLoading:g,error:b,response:N}}},84043:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return o},default:function(){return l}});var r=n(85893),i=n(1051),s=n(81627),a=n(9008),c=n.n(a),o=!0;function l(){let e=(0,s.T_)("titles");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c(),{children:(0,r.jsx)("title",{children:e("driverNotifications")})}),(0,r.jsx)(i.Z,{})]})}},20818:function(e,t,n){"use strict";n.d(t,{$G:function(){return i},Ew:function(){return s},aS:function(){return r}});let r=(e,t)=>e?e.length>t?e.substring(0,t)+"...":e:"",i=(e,t)=>{if(!e)return{truncatedText:"",fullText:"",isTruncated:!1};let n=e.split(" ");return n.length>t?{truncatedText:n.slice(0,t).join(" ")+"...",fullText:e,isTruncated:!0}:{truncatedText:e,fullText:e,isTruncated:!1}};function s(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}}},function(e){e.O(0,[2489,2888,9774,179],function(){return e(e.s=87935)}),_N_E=e.O()}]);

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.