(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[861],{656:function(e,c,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/attorney-panel/appointments",function(){return s(7017)}])},7336:function(e,c,s){"use strict";s.d(c,{Z:function(){return i}});var t=s(5893),a=s(6089),n=s.n(a),d=s(7294),r=s(1664),o=s.n(r),l=s(1163);function i(e){var c=e.children,s=(0,l.useRouter)(),a=(0,d.useState)(!1),r=a[0];a[1];return(0,t.jsxs)("div",{style:{backgroundColor:"#f4f7fa",minHeight:"100vh",display:"flex",flexDirection:"column"},className:"jsx-3ee271f478679b1d",children:[(0,t.jsx)("div",{className:"jsx-3ee271f478679b1d container py-5 flex-grow-1",children:(0,t.jsxs)("div",{className:"jsx-3ee271f478679b1d row g-4 pt-5",children:[(0,t.jsx)("aside",{className:"jsx-3ee271f478679b1d "+"col-lg-3 ".concat(r?"d-block":"d-none d-lg-block"),children:(0,t.jsxs)("div",{className:"jsx-3ee271f478679b1d card border-0 shadow-sm rounded-4 overflow-hidden",children:[(0,t.jsxs)("div",{className:"jsx-3ee271f478679b1d p-4 text-center border-bottom bg-white",children:[(0,t.jsx)("div",{style:{width:"120px",height:"120px"},className:"jsx-3ee271f478679b1d mx-auto mb-3",children:(0,t.jsx)("img",{src:"/assets/images/attorney1.png",style:{objectFit:"cover",border:"4px solid #f8f9fa"},alt:"avatar",className:"jsx-3ee271f478679b1d rounded-circle shadow-sm w-100 h-100"})}),(0,t.jsx)("h5",{style:{color:"#002147"},className:"jsx-3ee271f478679b1d fw-bold mb-1",children:"Tasnia Sharin"}),(0,t.jsx)("p",{className:"jsx-3ee271f478679b1d text-muted mb-0 fs-6",children:"attorney@gmail.com"})]}),(0,t.jsx)("div",{className:"jsx-3ee271f478679b1d p-3 bg-white",children:(0,t.jsxs)("nav",{className:"jsx-3ee271f478679b1d nav flex-column sidebar-nav",children:[[{name:"Dashboard",icon:"bi-grid-fill",path:"/attorney-panel"},{name:"Appointments",icon:"bi-calendar-check",path:"/attorney-panel/appointments"},{name:"Client Management",icon:"bi-people-fill",path:"/attorney-panel/clients"},{name:"Case Details",icon:"bi-clock-history",path:"/attorney-panel/cases"},{name:"Messages",icon:"bi-chat-dots-fill",path:"/attorney-panel/messages"},{name:"Ticket Management",icon:"bi-ticket-perforated-fill",path:"/attorney-panel/tickets"},{name:"Edit Profile",icon:"bi-person-bounding-box",path:"/attorney-panel/profile"}].map((function(e,c){return(0,t.jsx)(o(),{href:e.path,children:(0,t.jsxs)("a",{className:"jsx-3ee271f478679b1d "+"nav-link ".concat(s.pathname===e.path?"active":""),children:[(0,t.jsx)("i",{className:"jsx-3ee271f478679b1d "+"bi ".concat(e.icon," me-3")})," ",e.name]})},c)})),(0,t.jsx)("div",{className:"jsx-3ee271f478679b1d mt-4 pt-4 border-top",children:(0,t.jsx)(o(),{href:"/logout",children:(0,t.jsxs)("a",{className:"jsx-3ee271f478679b1d nav-link text-danger fw-bold",children:[(0,t.jsx)("i",{className:"jsx-3ee271f478679b1d bi bi-box-arrow-right me-3"})," Logout"]})})})]})})]})}),(0,t.jsx)("main",{className:"jsx-3ee271f478679b1d col-lg-9",children:c})]})}),(0,t.jsx)(n(),{id:"3ee271f478679b1d",children:".sidebar-nav.jsx-3ee271f478679b1d .nav-link.jsx-3ee271f478679b1d{color:#444!important;font-size:17px;padding:12px 20px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s;transition:.3s;margin-bottom:5px;font-weight:500;text-decoration:none;display:block}.sidebar-nav.jsx-3ee271f478679b1d .nav-link.jsx-3ee271f478679b1d:hover{background:#f8f9fa;color:#de9f57!important}.sidebar-nav.jsx-3ee271f478679b1d .nav-link.active.jsx-3ee271f478679b1d{background:#fcf6ef;color:#de9f57!important;font-weight:bold}"})]})}},7017:function(e,c,s){"use strict";s.r(c),s.d(c,{default:function(){return b}});var t=s(4924),a=s(6042),n=s(9396),d=s(797),r=s(5893),o=s(6089),l=s.n(o),i=s(7294),x=s(9008),m=s.n(x),f=s(1163),j=s(7336);function b(){var e=(0,f.useRouter)(),c=e.query,s=c.selectedUser,o=c.openModal,x=c.actionType,b=(0,i.useState)([{id:2,attorney:"Adv. Tasnia Sharin",type:"Civil",title:"Property Dispute",date:"2025-01-12",time:"02:00 PM",reason:"Client Meeting",doc:"\ud83d\udcc1",status:"Scheduled"},{id:1,attorney:"Adv. Tasnia Sharin",type:"Criminal",title:"State vs Sharma",date:"2025-01-05",time:"10:30 AM",reason:"Evidence Discussion",doc:"\ud83d\udcc1",status:"Scheduled"}]),p=b[0],h=b[1],u=(0,i.useState)([{id:101,attorney:"Adv. Tasnia Sharin",type:"Family",title:"Divorce Case",date:"2024-12-15",time:"11:00 AM",reason:"Final Hearing",doc:"\ud83d\udcc4",status:"Completed"}]),y=u[0],N=(u[1],(0,i.useState)(!1)),w=N[0],g=N[1],v=(0,i.useState)({attorney:"Adv. Tasnia Sharin",type:"",title:"",date:"",time:"",reason:"",status:"Scheduled"}),k=v[0],C=v[1],S=(0,i.useState)(null),z=S[0],A=S[1];(0,i.useEffect)((function(){"true"===o&&s&&(C((function(e){return(0,n.Z)((0,a.Z)({},e),{reason:"Meeting with ".concat(s)})})),g(!0),"edit"===x&&A(Date.now()))}),[o,s,x]);var O=function(e){return C((0,n.Z)((0,a.Z)({},k),(0,t.Z)({},e.target.name,e.target.value)))},D=function(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"new";e.push("/attorney-panel/organization-users?action=".concat(c))};return(0,r.jsxs)(j.Z,{children:[(0,r.jsx)(m(),{children:(0,r.jsx)("title",{className:"jsx-7c15d7cf31d8c6e7",children:"Lawstick | Appointment History"})}),(0,r.jsx)("div",{className:"jsx-7c15d7cf31d8c6e7 container-fluid px-0",children:(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 card border-0 shadow-sm rounded-4 p-3 p-md-5 bg-white w-100",children:[(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 d-flex justify-content-between align-items-center mb-5 flex-wrap gap-3",children:[(0,r.jsx)("h3",{style:{fontFamily:"serif",color:"#002147",fontSize:"26px"},className:"jsx-7c15d7cf31d8c6e7 fw-bold mb-0",children:"Appointment History"}),(0,r.jsxs)("button",{style:{backgroundColor:"#002147",fontSize:"15px"},onClick:function(){return D("new")},className:"jsx-7c15d7cf31d8c6e7 btn text-white px-4 rounded-pill fw-bold",children:[(0,r.jsx)("i",{className:"jsx-7c15d7cf31d8c6e7 bi bi-plus-lg me-2"})," New Appointment"]})]}),(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 mb-5",children:[(0,r.jsx)("h5",{style:{color:"#002147",fontSize:"18px"},className:"jsx-7c15d7cf31d8c6e7 fw-bold mb-4",children:"New Appointment"}),(0,r.jsx)("div",{className:"jsx-7c15d7cf31d8c6e7 table-responsive border rounded-3",children:(0,r.jsxs)("table",{className:"jsx-7c15d7cf31d8c6e7 table table-hover align-middle mb-0",children:[(0,r.jsx)("thead",{style:{backgroundColor:"#fcf6ef"},className:"jsx-7c15d7cf31d8c6e7",children:(0,r.jsxs)("tr",{style:{color:"#002147",fontSize:"14px"},className:"jsx-7c15d7cf31d8c6e7 text-nowrap",children:[(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7 py-3 px-3",children:"Attorney Name"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Case Type"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Case Title"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Date"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Time"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Reason"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Document"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Status"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7 text-center",children:"Actions"})]})}),(0,r.jsx)("tbody",{style:{fontSize:"14px"},className:"jsx-7c15d7cf31d8c6e7",children:p.length>0?p.map((function(e){return(0,r.jsxs)("tr",{className:"jsx-7c15d7cf31d8c6e7 text-nowrap border-bottom",children:[(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7 px-3 py-3 fw-bold",children:e.attorney}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.type}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.title}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.date}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.time}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:(0,r.jsx)("small",{className:"jsx-7c15d7cf31d8c6e7 text-muted",children:e.reason})}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7 text-center",children:e.doc}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:(0,r.jsx)("span",{className:"jsx-7c15d7cf31d8c6e7 badge bg-success-subtle text-success border border-success-subtle px-3",children:e.status})}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7 text-center",children:(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 d-flex gap-2 justify-content-center",children:[(0,r.jsx)("button",{onClick:function(){return D("edit")},className:"jsx-7c15d7cf31d8c6e7 btn btn-sm btn-outline-primary",children:"Re-schedule"}),(0,r.jsx)("button",{onClick:function(){return c=e.id,void(confirm("Are you sure you want to cancel this appointment?")&&h(p.filter((function(e){return e.id!==c}))));var c},className:"jsx-7c15d7cf31d8c6e7 btn btn-sm btn-outline-danger",children:"Cancel"})]})})]},e.id)})):(0,r.jsx)("tr",{className:"jsx-7c15d7cf31d8c6e7",children:(0,r.jsx)("td",{colSpan:"9",className:"jsx-7c15d7cf31d8c6e7 text-center py-4 text-muted",children:"No Active Appointments"})})})]})})]}),(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7",children:[(0,r.jsx)("h5",{style:{color:"#6c757d",fontSize:"18px"},className:"jsx-7c15d7cf31d8c6e7 fw-bold mb-4",children:"Appointments History"}),(0,r.jsx)("div",{className:"jsx-7c15d7cf31d8c6e7 table-responsive border rounded-3",children:(0,r.jsxs)("table",{style:{backgroundColor:"#f8f9fa"},className:"jsx-7c15d7cf31d8c6e7 table align-middle mb-0",children:[(0,r.jsx)("thead",{style:{backgroundColor:"#e9ecef"},className:"jsx-7c15d7cf31d8c6e7",children:(0,r.jsxs)("tr",{style:{color:"#002147",fontSize:"14px"},className:"jsx-7c15d7cf31d8c6e7 text-nowrap",children:[(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7 py-3 px-3",children:"Attorney Name"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Case Type"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Case Title"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Date"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Time"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Reason"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Document"}),(0,r.jsx)("th",{className:"jsx-7c15d7cf31d8c6e7",children:"Status"})]})}),(0,r.jsx)("tbody",{style:{fontSize:"14px",color:"#6c757d"},className:"jsx-7c15d7cf31d8c6e7",children:y.map((function(e){return(0,r.jsxs)("tr",{className:"jsx-7c15d7cf31d8c6e7 text-nowrap border-bottom",children:[(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7 px-3 py-3",children:e.attorney}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.type}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.title}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.date}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.time}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:e.reason}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7 text-center",children:e.doc}),(0,r.jsx)("td",{className:"jsx-7c15d7cf31d8c6e7",children:(0,r.jsx)("span",{className:"jsx-7c15d7cf31d8c6e7 badge bg-secondary-subtle text-secondary px-3",children:e.status})})]},e.id)}))})]})})]})]})}),w&&(0,r.jsx)("div",{className:"jsx-7c15d7cf31d8c6e7 modal-overlay",children:(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 modal-card border-0 shadow-lg",children:[(0,r.jsxs)("div",{style:{backgroundColor:"#002147"},className:"jsx-7c15d7cf31d8c6e7 p-4 d-flex justify-content-between align-items-center text-white",children:[(0,r.jsx)("h5",{className:"jsx-7c15d7cf31d8c6e7 mb-0 fw-bold",children:z?"Re-schedule Appointment":"New Appointment"}),(0,r.jsx)("button",{onClick:function(){return g(!1)},className:"jsx-7c15d7cf31d8c6e7 btn-close btn-close-white"})]}),(0,r.jsx)("div",{className:"jsx-7c15d7cf31d8c6e7 p-4 bg-white",children:(0,r.jsxs)("form",{onSubmit:function(c){c.preventDefault(),h(z?p.map((function(e){return e.id===z?(0,n.Z)((0,a.Z)({},k),{id:z}):e})):[(0,n.Z)((0,a.Z)({},k),{id:Date.now(),doc:"\ud83d\udcc1"})].concat((0,d.Z)(p))),g(!1),A(null),e.replace("/attorney-panel/appointments",void 0,{shallow:!0})},className:"jsx-7c15d7cf31d8c6e7",children:[(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 row g-3",children:[(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 col-md-6",children:[(0,r.jsx)("label",{className:"jsx-7c15d7cf31d8c6e7 form-label fw-bold small",children:"Case Type"}),(0,r.jsx)("input",{type:"text",name:"type",placeholder:"Criminal, Civil etc.",value:k.type,onChange:O,required:!0,className:"jsx-7c15d7cf31d8c6e7 form-control"})]}),(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 col-md-6",children:[(0,r.jsx)("label",{className:"jsx-7c15d7cf31d8c6e7 form-label fw-bold small",children:"Case Title"}),(0,r.jsx)("input",{type:"text",name:"title",placeholder:"Case Name",value:k.title,onChange:O,required:!0,className:"jsx-7c15d7cf31d8c6e7 form-control"})]}),(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 col-md-6",children:[(0,r.jsx)("label",{className:"jsx-7c15d7cf31d8c6e7 form-label fw-bold small",children:"Date"}),(0,r.jsx)("input",{type:"date",name:"date",value:k.date,onChange:O,required:!0,className:"jsx-7c15d7cf31d8c6e7 form-control"})]}),(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 col-md-6",children:[(0,r.jsx)("label",{className:"jsx-7c15d7cf31d8c6e7 form-label fw-bold small",children:"Time"}),(0,r.jsx)("input",{type:"time",name:"time",value:k.time,onChange:O,required:!0,className:"jsx-7c15d7cf31d8c6e7 form-control"})]}),(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 col-12",children:[(0,r.jsx)("label",{className:"jsx-7c15d7cf31d8c6e7 form-label fw-bold small",children:"Reason"}),(0,r.jsx)("textarea",{name:"reason",rows:"3",placeholder:"Description...",value:k.reason,onChange:O,required:!0,className:"jsx-7c15d7cf31d8c6e7 form-control"})]})]}),(0,r.jsxs)("div",{className:"jsx-7c15d7cf31d8c6e7 mt-4 d-flex gap-2",children:[(0,r.jsx)("button",{type:"submit",style:{backgroundColor:"#002147"},className:"jsx-7c15d7cf31d8c6e7 btn text-white w-100 fw-bold py-2",children:z?"Update Appointment":"Schedule Appointment"}),(0,r.jsx)("button",{type:"button",onClick:function(){return g(!1)},className:"jsx-7c15d7cf31d8c6e7 btn btn-light border w-100 fw-bold py-2",children:"Cancel"})]})]})})]})}),(0,r.jsx)(l(),{id:"7c15d7cf31d8c6e7",children:".modal-overlay.jsx-7c15d7cf31d8c6e7{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,.7);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;z-index:9999;padding:20px}.modal-card.jsx-7c15d7cf31d8c6e7{width:100%;max-width:600px;background:white;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;-webkit-box-shadow:0 10px 30px rgba(0,0,0,.3);-moz-box-shadow:0 10px 30px rgba(0,0,0,.3);box-shadow:0 10px 30px rgba(0,0,0,.3);-webkit-animation:zoomIn.3s ease;-moz-animation:zoomIn.3s ease;-o-animation:zoomIn.3s ease;animation:zoomIn.3s ease;overflow:hidden}@-webkit-keyframes zoomIn{from{-webkit-transform:scale(.9);transform:scale(.9);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-moz-keyframes zoomIn{from{-moz-transform:scale(.9);transform:scale(.9);opacity:0}to{-moz-transform:scale(1);transform:scale(1);opacity:1}}@-o-keyframes zoomIn{from{-o-transform:scale(.9);transform:scale(.9);opacity:0}to{-o-transform:scale(1);transform:scale(1);opacity:1}}@keyframes zoomIn{from{-webkit-transform:scale(.9);-moz-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9);opacity:0}to{-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);transform:scale(1);opacity:1}}.table.jsx-7c15d7cf31d8c6e7 th.jsx-7c15d7cf31d8c6e7{font-weight:600;text-transform:uppercase;letter-spacing:.5px}.form-control.jsx-7c15d7cf31d8c6e7:focus{border-color:#de9f57;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.container-fluid{max-width:100%!important}.badge.jsx-7c15d7cf31d8c6e7{font-weight:600;font-size:11px}"})]})}},9396:function(e,c,s){"use strict";function t(e,c){return c=null!=c?c:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):function(e,c){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter((function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),s.push.apply(s,t)}return s}(Object(c)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(c,s))})),e}s.d(c,{Z:function(){return t}})},797:function(e,c,s){"use strict";function t(e,c){(null==c||c>e.length)&&(c=e.length);for(var s=0,t=new Array(c);s