PageSourceSearch

https://taskudos.net/assets/CreateGroupPage-BD6BdHIO.js

js taskudos.net collected 2026-10-02 01:06:08 UTC 3,540 bytes, 1 lines download raw bytes

1import{j as e}from"./data-vendor-BbRRaOei.js";import{a as n,u as h}from"./react-vendor-CTMQ6zmr.js";import{f as b,Z as f}from"./index-D9-csJG3.js";import{u as N}from"./i18n-vendor-BcG5Fkkq.js";import"./swipe-vendor-Du95hpjX.js";import"./ui-vendor-B6XsRz8N.js";import"./tw-merge-C6Cmh_M-.js";import"./firebase-auth-D9FSLi8g.js";import"./firebase-functions-w4CkjSCL.js";import"./firebase-app-DUOH9wz5.js";import"./firebase-firestore-Ql9DxvAQ.js";import"./firebase-storage-BoKl8lfL.js";import"./dnd-vendor-CBnHgLcf.js";import"./animation-vendor-C5eF-vcf.js";function B(){const{t}=N(),[r,u]=n.useState(""),i=h(),{user:o}=b(),m=f(),[c,d]=n.useState(""),[l,p]=n.useState(""),x=async s=>{if(s.preventDefault(),!(!r.trim()||!o))try{await m.mutateAsync({input:{name:r.trim(),startDate:c?new Date(c):void 0,dueDate:l?new Date(l):void 0},userId:o.uid,userEmail:o.email||"",userName:o.displayName||void 0}),i("/groups")}catch(g){console.error("Group creation error:",g)}},a=m.isPending;return e.jsx("div",{className:"min-h-screen bg-surface-50 px-4 py-8",children:e.jsxs("div",{className:"max-w-lg mx-auto",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("button",{onClick:()=>i(-1),className:"flex items-center text-surface-600 hover:text-surface-900 dark:hover:text-white mb-4",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M15 18l-6-6 6-6"})}),e.jsx("span",{className:"ml-1",children:t("groups.create.back")})]}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:t("groups.create.title")}),e.jsx("p",{className:"text-surface-600 mt-2",children:t("groups.create.description")})]}),e.jsxs("form",{onSubmit:x,className:"bg-surface-100 rounded-lg shadow p-6",children:[e.jsxs("div",{className:"mb-6",children:[e.jsxs("label",{htmlFor:"groupName",className:"block text-sm font-medium text-surface-700 mb-2",children:[t("groups.create.groupName")," ",e.jsx("span",{className:"text-error",children:"*"})]}),e.jsx("input",{type:"text",id:"groupName",value:r,onChange:s=>u(s.target.value),placeholder:t("groups.create.namePlaceholder"),className:"input-field-sm py-3",maxLength:50,disabled:a}),e.jsx("p",{className:"text-xs text-surface-500 mt-1",children:t("groups.create.charCount",{count:r.length,max:50})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-surface-700 mb-1",children:t("groups.create.startDate")}),e.jsx("input",{type:"date",value:c,onChange:s=>d(s.target.value),className:"input-field-sm",disabled:a})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-surface-700 mb-1",children:t("groups.create.dueDate")}),e.jsx("input",{type:"date",value:l,onChange:s=>p(s.target.value),className:"input-field-sm",disabled:a})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{type:"button",onClick:()=>i(-1),className:"flex-1 px-4 py-3 border border-surface-300 rounded-lg text-surface-700 hover:bg-surface-50 transition-colors",disabled:a,children:t("groups.create.cancel")}),e.jsx("button",{type:"submit",disabled:a||!r.trim(),className:"flex-1 px-4 py-3 bg-primary-600 text-white rounded-lg hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:t(a?"groups.create.creating":"groups.create.submit")})]})]})]})})}export{B as default};

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.