1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(()=>{var e={};e.id=6193,e.ids=[6193],e.modules={398:(e,t,s)=>{Promise.resolve().then(s.bind(s,20787))},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7094:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});let r=(0,s(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/alma/Documents/NeahNew/app/mission-tab/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/alma/Documents/NeahNew/app/mission-tab/page.tsx","default")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11723:e=>{"use strict";e.exports=require("querystring")},12412:e=>{"use strict";e.exports=require("assert")},14985:e=>{"use strict";e.exports=require("dns")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20787:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s(60687);function a({children:e}){return(0,r.jsx)("main",{className:"w-full h-screen bg-white",children:(0,r.jsx)("div",{className:"w-full h-full px-4 pt-12 pb-4",children:e})})}s(43210)},21820:e=>{"use strict";e.exports=require("os")},23168:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s(60687),a=s(43210),i=s(99270),o=s(68988),n=s(85814),l=s.n(n),d=s(24934),c=s(70333);function u(){let[e,t]=(0,a.useState)(""),[s,n]=(0,a.useState)([]),[u,p]=(0,a.useState)(!0),{toast:m}=(0,c.dj)(),x=s.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||t.niveau.toLowerCase().includes(e.toLowerCase())||t.missionType.toLowerCase().includes(e.toLowerCase())||t.oddScope.some(t=>t.toLowerCase().includes(e.toLowerCase()))),h=e=>new Date(e).toLocaleDateString("fr-FR",{day:"2-digit",month:"2-digit",year:"numeric"}),b=e=>{let t=e.oddScope&&e.oddScope.length>0?e.oddScope[0]:null,s=t?t.replace("odd-",""):null;return{number:s,label:s?`ODD ${s}`:"Non cat\xe9goris\xe9",iconPath:s?`/F SDG Icons 2019 WEB/F-WEB-Goal-${s.padStart(2,"0")}.png`:""}},f=e=>{switch(e){case"a":return"bg-green-100 text-green-800";case"b":return"bg-blue-100 text-blue-800";case"c":return"bg-purple-100 text-purple-800";case"s":return"bg-amber-100 text-amber-800";default:return"bg-gray-100 text-gray-800"}},g=e=>{switch(e){case"a":return"A";case"b":return"B";case"c":return"C";case"s":return"S";default:return e.toUpperCase()}};return(0,r.jsxs)("div",{className:"flex flex-col h-[calc(100vh-64px)] w-full bg-white",children:[(0,r.jsx)("div",{className:"bg-white border-b border-gray-100 py-3 px-6",children:(0,r.jsx)("h1",{className:"text-gray-800 text-xl font-bold",children:"Le Tableau des Missions"})}),(0,r.jsx)("div",{className:"bg-white border-b border-gray-100 py-3 px-6",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-gray-800 text-base font-medium",children:"Toutes les missions disponibles"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(i.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500"}),(0,r.jsx)(o.p,{placeholder:"Rechercher une mission...",className:"h-9 pl-9 pr-3 py-2 text-sm bg-white text-gray-800 border-gray-200 rounded-md w-60",value:e,onChange:e=>t(e.target.value)})]})]})}),(0,r.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:u?(0,r.jsx)("div",{className:"flex justify-center items-center h-40",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-600"})}):x.length>0?(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:x.map(e=>{let t=b(e),s=f(e.niveau);return(0,r.jsxs)("div",{className:"bg-white shadow-sm hover:shadow-md transition-shadow duration-200 border border-gray-200 overflow-hidden h-full rounded-lg flex flex-col",children:[(0,r.jsxs)("div",{className:"px-5 pt-4 pb-3 flex justify-between items-center border-b border-gray-100",children:[(0,r.jsx)("h2",{className:"text-base font-medium text-gray-900 line-clamp-2 flex-1",children:e.name}),(0,r.jsxs)("div",{className:"flex items-center gap-2 ml-2",children:[t.number&&(0,r.jsx)("div",{className:"flex items-center bg-gray-100 p-1 rounded-md",children:(0,r.jsx)("img",{src:t.iconPath,alt:t.label,className:"w-8 h-8",onError:e=>{e.target.style.display="none"}})}),(0,r.jsx)("span",{className:`flex-shrink-0 text-sm font-bold px-2.5 py-1.5 rounded-md ${s}`,children:g(e.niveau)})]})]}),(0,r.jsx)("div",{className:"flex justify-center items-center p-6 flex-grow",children:(0,r.jsxs)("div",{className:"w-48 h-48 relative",children:[e.logo?(0,r.jsx)("img",{src:e.logo||"",alt:e.name,className:"w-full h-full object-cover rounded-md",onError:t=>{console.log("Logo failed to load:",e.logo),console.log("Full URL attempted:",e.logo),t.currentTarget.style.display="none";let s=t.currentTarget.parentElement?.querySelector(".logo-fallback");s&&(s.style.display="flex")}}):null,(0,r.jsx)("div",{className:`logo-fallback w-full h-full flex items-center justify-center bg-gray-100 rounded-md text-gray-500 text-4xl font-medium ${e.logo?"hidden":""}`,children:e.name.slice(0,2).toUpperCase()})]})}),(0,r.jsxs)("div",{className:"px-5 pb-3",children:[e.services&&e.services.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-1",children:"Services:"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-3",children:e.services.map(e=>(0,r.jsx)("span",{className:"bg-blue-50 text-blue-700 px-2 py-1 rounded-md text-xs font-medium",children:e},e))})]}),(0,r.jsx)("div",{className:"mt-2 text-sm text-gray-600 line-clamp-2",children:e.intention?e.intention.substring(0,100)+(e.intention.length>100?"...":""):"Pas de description disponible."})]}),(0,r.jsxs)("div",{className:"mt-auto px-5 py-3 border-t border-gray-100 bg-gray-50 flex justify-between items-center",children:[(0,r.jsxs)("span",{className:"text-xs text-gray-500",children:["Cr\xe9\xe9e le ",h(e.createdAt)]}),(0,r.jsx)(l(),{href:`/mission-tab/${e.id}`,children:(0,r.jsx)(d.$,{className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 h-7 rounded-md",children:"Voir d\xe9tails"})})]})]},e.id)})}):(0,r.jsx)("div",{className:"flex justify-center items-center h-40 bg-white rounded-lg shadow-sm border border-gray-200 p-6",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("p",{className:"text-gray-500 font-medium mb-2",children:"Aucune mission trouv\xe9e"}),(0,r.jsx)("p",{className:"text-gray-400 text-sm",children:"Modifiez vos crit\xe8res de recherche ou r\xe9essayez plus tard."})]})})})]})}},27910:e=>{"use strict";e.exports=require("stream")},28354:e=>{"use strict";e.exports=require("util")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},34533:(e,t,s)=>{Promise.resolve().then(s.bind(s,7094))},34631:e=>{"use strict";e.exports=require("tls")},39718:(e,t,s)=>{Promise.resolve().then(s.bind(s,90609))},41204:e=>{"use strict";e.exports=require("string_decoder")},47685:(e,t,s)=>{Promise.resolve().then(s.bind(s,23168))},55511:e=>{"use strict";e.exports=require("crypto")},55591:e=>{"use strict";e.exports=require("https")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70333:(e,t,s)=>{"use strict";s.d(t,{dj:()=>p,oR:()=>u});var r=s(43210);let a=0,i=new Map,o=e=>{if(i.has(e))return;let t=setTimeout(()=>{i.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);i.set(e,t)},n=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?o(s):e.toasts.forEach(e=>{o(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],d={toasts:[]};function c(e){d=n(d,e),l.forEach(e=>{e(d)})}function u({...e}){let t=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>c({type:"DISMISS_TOAST",toastId:t});return c({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||s()}}}),{id:t,dismiss:s,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function p(){let[e,t]=r.useState(d);return r.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},74075:e=>{"use strict";e.exports=require("zlib")},79428:e=>{"use strict";e.exports=require("buffer")},79551:e=>{"use strict";e.exports=require("url")},81630:e=>{"use strict";e.exports=require("http")},82005:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GlobalError:()=>o.a,__next_app__:()=>u,pages:()=>c,routeModule:()=>p,tree:()=>d});var r=s(65239),a=s(48088),i=s(88170),o=s.n(i),n=s(30893),l={};for(let e in n)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>n[e]);s.d(t,l);let d={children:["",{children:["mission-tab",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(s.bind(s,7094)),"/Users/alma/Documents/NeahNew/app/mission-tab/page.tsx"]}]},{layout:[()=>Promise.resolve().then(s.bind(s,90609)),"/Users/alma/Documents/NeahNew/app/mission-tab/layout.tsx"]}]},{layout:[()=>Promise.resolve().then(s.bind(s,58014)),"/Users/alma/Documents/NeahNew/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(s.t.bind(s,57398,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(s.t.bind(s,89999,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(s.t.bind(s,65284,23)),"next/dist/client/components/unauthorized-error"]}]}.children,c=["/Users/alma/Documents/NeahNew/app/mission-tab/page.tsx"],u={require:s,loadChunk:()=>Promise.resolve()},p=new r.AppPageRouteModule({definition:{kind:a.RouteKind.APP_PAGE,page:"/mission-tab/page",pathname:"/mission-tab",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},83997:e=>{"use strict";e.exports=require("tty")},90609:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});let r=(0,s(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/alma/Documents/NeahNew/app/mission-tab/layout.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/alma/Documents/NeahNew/app/mission-tab/layout.tsx","default")},91645:e=>{"use strict";e.exports=require("net")},94735:e=>{"use strict";e.exports=require("events")},99270:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(62688).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[4243,5419,8794,1642,6724,748,6781,5500],()=>s(82005));module.exports=r})(); |