mirror of
https://github.com/KarolChang/jm-expense-vue-ts.git
synced 2024-12-26 03:38:35 +00:00
deploy
This commit is contained in:
commit
cba41420b9
1
assets/Access.83adb1a9.js
Normal file
1
assets/Access.83adb1a9.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
var P=Object.defineProperty;var A=(i,o,n)=>o in i?P(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n;var a=(i,o,n)=>(A(i,typeof o!="symbol"?o+"":o,n),n);import{u as v}from"./index.e0544e65.js";import{S as D}from"./Spinner.5acc2245.js";import{f as F,u as I,x as d,o as s,c as l,l as E,t as h,h as e,F as p,P as f,k as N,p as w}from"./vendor.495b01ec.js";class R{constructor(){a(this,"id");a(this,"name");a(this,"name_en");a(this,"deletedAt");a(this,"createdAt");a(this,"updatedAt");a(this,"Permissions")}}const S={key:0},T={class:"d-flex my-3"},O={key:0,class:"table table-striped table-danger table-hover"},V={key:0,scope:"col"},L=e("th",{scope:"col"},"ID",-1),M=e("th",{scope:"col"},"ACTION",-1),$=e("th",{scope:"col"},"ITEM",-1),j=e("th",{scope:"col"},"DESCRIPTION",-1),q=["onClick"],z={key:0},G={class:"form-check"},H=["checked"],J=e("label",{class:"form-check-label",for:"flexCheckChecked"},null,-1),K={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},Z=F({setup(i){const o=I(),n=d(!0),r=d(!1),m=d(new R),_=d([]),u=d([]),b=async function(){try{const{data:t}=await v.role.getOne(Number(o.params.id));m.value=t.data,n.value=!1}catch(t){console.error("error",t)}},y=async function(){try{const{data:t}=await v.permission.getAll();_.value=t.data,n.value=!1}catch(t){console.error("error",t)}},C=()=>{r.value=!0,u.value=m.value.Permissions.map(t=>t.id)},g=t=>{if(r.value)if(!u.value.includes(t))u.value.push(t);else{const k=u.value.findIndex(c=>c===t);u.value.splice(k,1)}},x=()=>{r.value=!1};return b(),y(),(t,k)=>n.value?(s(),w(D,{key:1})):(s(),l("div",S,[E(h(u.value)+" ",1),e("div",T,[r.value?(s(),l(p,{key:1},[e("button",{onClick:k[0]||(k[0]=c=>r.value=!1),class:"btn btn-secondary me-3"},"\u53D6\u6D88\u7DE8\u8F2F"),e("button",{onClick:x,class:"btn btn-warning"},"\u78BA\u5B9A\u7DE8\u8F2F")],64)):(s(),l("button",{key:0,onClick:C,class:"btn btn-primary"},"\u958B\u59CB\u7DE8\u8F2F"))]),_.value.length?(s(),l("table",O,[e("thead",null,[e("tr",null,[r.value?(s(),l("th",V,"#")):f("",!0),L,M,$,j])]),e("tbody",null,[(s(!0),l(p,null,N(_.value,(c,B)=>(s(),l("tr",{key:B,onClick:Q=>g(c.id)},[r.value?(s(),l("td",z,[e("div",G,[e("input",{class:"form-check-input",type:"checkbox",value:"",id:"flexCheckChecked",checked:u.value.includes(c.id)},null,8,H),J])])):f("",!0),e("td",null,h(c.id),1),e("td",null,h(c.action),1),e("td",null,h(c.item),1),e("td",null,h(c.description),1)],8,q))),128))])])):(s(),l("img",K))]))}});export{Z as default};
|
1
assets/ClosedRecord.69250e9b.js
Normal file
1
assets/ClosedRecord.69250e9b.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{r as v}from"./record.faac3df9.js";import{g as D,d as n}from"./dateFormat.26b8f760.js";import{S as y}from"./Spinner.5acc2245.js";import{_ as g,d as k}from"./dateFilter.34232561.js";import{_ as B}from"./index.e0544e65.js";import{f as S,x as u,g as F,C as Y,o as s,c as r,j as A,m as d,h as t,F as b,k as x,t as a,p as w,A as C,B as E}from"./vendor.495b01ec.js";const I=c=>(C("data-v-252006ce"),c=c(),E(),c),L={key:0},M={key:0,class:"table table-striped table-info table-hover"},R=I(()=>t("thead",null,[t("tr",null,[t("th",{scope:"col"},"\u9805\u76EE"),t("th",{scope:"col"},"\u5546\u5BB6"),t("th",{scope:"col"},"\u91D1\u984D"),t("th",{scope:"col"},"\u65E5\u671F"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u8005"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u6642\u9593"),t("th",{scope:"col",id:"column-item"},"\u66F4\u65B0\u6642\u9593")])],-1)),N={id:"column-item"},j={id:"column-item"},O={id:"column-item"},P={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},V=S({setup(c){const m=u(!0),o=u([]),i=u({searchMode:"\u6708\u4EFD",filter:{year:0,month:0,startDate:"",finishDate:""}}),h=async function(){try{const{data:l}=await v.getAll();o.value=l.data.filter(_=>_.isClosed===!0),i.value.filter={year:n(o.value[0].date).year(),month:n(o.value[0].date).month()+1,startDate:n(o.value[0].date).startOf("month").format("YYYY-MM-DD"),finishDate:n(o.value[0].date).endOf("month").format("YYYY-MM-DD")},m.value=!1}catch(l){console.error("error",l)}},p=F(()=>k(i.value,o.value));return h(),Y("dateFilterData",i),(l,_)=>m.value?(s(),w(y,{key:1})):(s(),r("div",L,[A(g),d(p).length?(s(),r("table",M,[R,t("tbody",null,[(s(!0),r(b,null,x(d(p),(e,f)=>(s(),r("tr",{key:f},[t("td",null,a(e.item),1),t("td",null,a(e.merchant),1),t("td",null,a(e.amount),1),t("td",null,a(new Date(e.date).toLocaleDateString()+" "+d(D)(e.date)),1),t("td",N,a(e.User.displayName),1),t("td",j,a(new Date(e.createdAt).toLocaleString()),1),t("td",O,a(new Date(e.updatedAt).toLocaleString()),1)]))),128))])])):(s(),r("img",P))]))}});var J=B(V,[["__scopeId","data-v-252006ce"]]);export{J as default};
|
1
assets/ClosedRecord.87e73f4b.css
Normal file
1
assets/ClosedRecord.87e73f4b.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
th[data-v-252006ce],td[data-v-252006ce]{white-space:nowrap}@media screen and (max-width: 400px){#column-item[data-v-252006ce]{display:none}}
|
35
assets/CreateRecordModalButton.e30c1d0f.js
Normal file
35
assets/CreateRecordModalButton.e30c1d0f.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import{f,K as v,i as b,o as B,c as w,h as C,S as h}from"./vendor.495b01ec.js";import{b as y,c as E,d as F,T as n,C as x}from"./index.e0544e65.js";import{r as g}from"./record.faac3df9.js";var A={push(t){return y.post("/push",t)}};const D=async t=>{try{const a={to:["Ub3557f7c812e4e78293959fe4fccd414","Ue5746fb7f35d2322a698d62dc9c9a21d"],messages:{type:"text",text:t}};await A.push(a)}catch(a){console.error("error",a)}},R=f({props:{view:null},setup(t){const a=t,s=E(),i=v(),d=b("refetchRecords"),m=async()=>{try{const{value:e}=await F.fire({title:"\u65B0\u589E\u8CC7\u6599",html:`
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-item" class="col-form-label">\u9805\u76EE</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" id="swal-item" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-merchant" class="col-form-label">\u5546\u5BB6</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" id="swal-merchant" class="form-control" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-amount" class="col-form-label">\u91D1\u984D</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="number" id="swal-amount" class="form-control" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-date" class="col-form-label">\u65E5\u671F</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="date" id="swal-date" class="form-control" value="${new Date().toJSON().substring(0,10)}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,preConfirm:()=>{var r;const o=document.getElementById("swal-item").value,u=document.getElementById("swal-merchant").value,c=document.getElementById("swal-amount").value,l=new Date(document.getElementById("swal-date").value);return(!o||!u||!c||!l)&&h.showValidationMessage("\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01\u82E5\u7D00\u9304\u8005\u70BA\u7A7A\uFF0C\u8ACB\u767B\u5165~"),{input:{item:o,merchant:u,amount:c,date:l,UserId:(r=s.currentUser)==null?void 0:r.id}}}});e&&p(e)}catch(e){console.error("error",e)}},p=async function(e){try{await g.create(e.input),n.fire({icon:"success",title:"\u6210\u529F\u5EFA\u7ACB\u8CC7\u6599\uFF01"}),a.view==="Record"?d():i.push({name:"Record"}),D(`${s.nickName}${s.icon}\u65B0\u589E\u4E86\u4E00\u7B46\u7D00\u9304 \u2192
|
||||||
|
${e.input.merchant}-${e.input.item} ${e.input.amount}`),x("Speak",`\u6210\u529F\u7D00\u9304${e.input.amount}\u5143`)}catch(o){console.error("error",o),n.fire({icon:"error",title:"\u65B0\u589E\u8CC7\u6599\u5931\u6557\uFF01"})}};return(e,o)=>(B(),w("div",null,[C("button",{type:"button",class:"btn btn-success",onClick:m},"\u65B0\u589E\u8CC7\u6599")]))}});export{R as _,A as l,D as p};
|
163
assets/Expense.e2bf2766.js
Normal file
163
assets/Expense.e2bf2766.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/Expense.f22af147.css
Normal file
1
assets/Expense.f22af147.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
span[data-v-5061c15d]:hover{cursor:pointer;color:#ff8c00}i[data-v-3a3dba24]:hover{color:#e21313;cursor:pointer}i[data-v-cd15d4ec]:hover{color:#1ec539;cursor:pointer}.scroll[data-v-661d09f9]{overflow-y:auto}.nav-link[data-v-661d09f9]{cursor:pointer}i[data-v-49eac3b5]:hover{color:#1ec539;cursor:pointer}i[data-v-5dc5c3f6]:hover{color:#e21313;cursor:pointer}
|
1
assets/Game.62e692cc.css
Normal file
1
assets/Game.62e692cc.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
.num-block[data-v-275901cc]{height:50px;width:50px;background-color:#d3d3d3;border:2px solid black;border-radius:8%;margin:0 5px;text-align:center;font-size:28px}.num-btn[data-v-275901cc]{width:15%;background-color:#fff;border:2px solid black;border-radius:8%;margin:5px;text-align:center;font-size:28px;cursor:pointer}.btn-customer[data-v-275901cc]{width:35%;border:2px solid black;border-radius:5%;margin:5px;text-align:center;font-size:20px;cursor:pointer;color:#000}.back-btn[data-v-275901cc]{background-color:#ff0}.enter-btn[data-v-275901cc]{background-color:#adff2f}.reset-btn[data-v-275901cc]{background-color:#00ced1}.num-block[data-v-92108812]{height:50px;width:50px;background-color:#d3d3d3;border:2px solid black;border-radius:8%;margin:0 5px;text-align:center;font-size:28px}.num-btn[data-v-92108812]{width:15%;background-color:#fff;border:2px solid black;border-radius:8%;margin:5px;text-align:center;font-size:28px;cursor:pointer}.btn-customer[data-v-92108812]{width:35%;border:2px solid black;border-radius:5%;margin:5px;text-align:center;font-size:20px;cursor:pointer;color:#000}.back-btn[data-v-92108812]{background-color:#ff0}.enter-btn[data-v-92108812]{background-color:#adff2f}.reset-btn[data-v-92108812]{background-color:#00ced1}.num-block[data-v-56bac710]{height:50px;width:50px;background-color:#d3d3d3;border:2px solid black;border-radius:8%;margin:0 5px;text-align:center;font-size:28px}.num-btn[data-v-56bac710]{width:15%;background-color:#fff;border:2px solid black;border-radius:8%;margin:5px;text-align:center;font-size:28px;cursor:pointer}.btn-customer[data-v-56bac710]{width:35%;border:2px solid black;border-radius:5%;margin:5px;text-align:center;font-size:20px;cursor:pointer;color:#000}.back-btn[data-v-56bac710]{background-color:#ff0}.enter-btn[data-v-56bac710]{background-color:#adff2f}.reset-btn[data-v-56bac710]{background-color:#00ced1}
|
3
assets/Game.d0eb1356.js
Normal file
3
assets/Game.d0eb1356.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import{_ as B}from"./index.e0544e65.js";import{f as $,x as h,o as u,c as n,h as e,t as a,F as p,k as f,n as y,A as x,B as A,p as F,P as E}from"./vendor.495b01ec.js";const D=d=>(x("data-v-275901cc"),d=d(),A(),d),S={key:0,class:"container"},w={class:"row"},N={class:"col col-sm-6"},R={class:"d-flex justify-content-center mb-3"},I={class:"num-block"},W={class:"num-block"},j={class:"num-block"},G={class:"num-block"},T={class:"d-flex flex-wrap justify-content-center"},M=["onClick"],O={class:"d-flex justify-content-center mb-3"},K={class:"col col-sm-6"},U=D(()=>e("h4",{class:"text-center"},"GUESS RECORDS",-1)),V={class:"list-group"},z={class:"d-flex align-items-center"},L=$({setup(d){const v=Array.from({length:10},(l,t)=>t),o=[];for(let l=0;l<4;l++){const t=Math.floor(Math.random()*v.length);o.push(v[t]),v.splice(t,1)}console.log("answer",o);const s=h([]),_=h(Array(10)),r=h([]),k=h(!1),b=l=>{if(s.value.length>=4)return alert("\u6578\u5B57\u5DF2\u6EFF\uFF01");if(s.value.includes(l))return alert("\u6578\u5B57\u91CD\u8907\uFF01");s.value.push(l)},g=()=>{if(console.log("enterClick"),s.value.length!==4)return alert("\u6578\u5B57\u672A\u9054\u56DB\u4F4D\uFF01");let l=0;if(s.value.forEach((t,i)=>{t===o[i]?(_.value[t]="success",l+=1):o.includes(t)?_.value[t]="warning":_.value[t]="secondary"}),r.value.push({number:s.value,status:[..._.value]}),l===4)return k.value=!0,alert(`\u606D\u559C\u7B54\u5C0D\uFF01\u4F60\u771F\u5E78\u904B~
|
||||||
|
\u7E3D\u6B21\u6578:${r.value.length}\u6B21`);s.value=[]},c=()=>{s.value=[],r.value=[],_.value=Array(10),k.value=!1};return(l,t)=>k.value?(u(),n("img",{key:1,src:"https://i.imgur.com/OmkEpSv.jpg",alt:"",class:"img-fluid",onClick:c})):(u(),n("div",S,[e("div",w,[e("div",N,[e("div",R,[e("div",I,a(s.value[0]),1),e("div",W,a(s.value[1]),1),e("div",j,a(s.value[2]),1),e("div",G,a(s.value[3]),1)]),e("div",T,[(u(!0),n(p,null,f(_.value,(i,m)=>(u(),n("div",{key:m,onClick:C=>b(m),class:y(`num-btn bg-${i||"light"}`)},a(m),11,M))),128))]),e("div",O,[k.value?(u(),n("div",{key:0,class:"btn-customer reset-btn",onClick:c},"RESET")):(u(),n(p,{key:1},[e("div",{class:"btn-customer back-btn col-6",onClick:t[0]||(t[0]=i=>s.value.pop())},"BACK"),e("div",{class:"btn-customer enter-btn col-6",onClick:g},"ENTER")],64))])]),e("div",K,[U,e("ul",V,[(u(!0),n(p,null,f(r.value,(i,m)=>(u(),n("li",{class:"list-group-item mx-auto",key:m},[e("div",z,[(u(!0),n(p,null,f(i.number,C=>(u(),n("div",{class:y("num-block bg-"+i.status[C]),key:C},a(C),3))),128))])]))),128))])])])]))}});var P=B(L,[["__scopeId","data-v-275901cc"]]);const q=d=>(x("data-v-92108812"),d=d(),A(),d),H={key:0,class:"container"},J={class:"row"},Q={class:"col col-sm-6"},X={class:"d-flex justify-content-center mb-3"},Y={class:"num-block"},Z={class:"num-block"},ee={class:"num-block"},se={class:"num-block"},te={class:"d-flex flex-wrap justify-content-center"},ue=["onClick"],le={class:"d-flex justify-content-center mb-3"},ne={class:"col col-sm-6"},ce=q(()=>e("h4",{class:"text-center"},"GUESS RECORDS",-1)),oe={class:"list-group"},ae={class:"d-flex align-items-center"},re={class:"ms-2"},ie=$({setup(d){const v=Array.from({length:10},(c,l)=>l),o=[];for(let c=0;c<4;c++){const l=Math.floor(Math.random()*v.length);o.push(v[l]),v.splice(l,1)}console.log("answer",o);const s=h([]),_=h([]),r=h(!1),k=c=>{if(s.value.length>=4)return alert("\u6578\u5B57\u5DF2\u6EFF\uFF01");if(s.value.includes(c))return alert("\u6578\u5B57\u91CD\u8907\uFF01");s.value.push(c)},b=()=>{if(console.log("enterClick"),s.value.length!==4)return alert("\u6578\u5B57\u672A\u9054\u56DB\u4F4D\uFF01");let c=0,l=0;if(s.value.forEach((t,i)=>{t===o[i]?c+=1:o.includes(t)&&(l+=1)}),_.value.push({number:s.value,status:`${c?c+"A":""}${l?l+"B":""}`}),c===4)return r.value=!0,alert(`\u606D\u559C\u7B54\u5C0D\uFF01\u4F60\u771F\u5E78\u904B~
|
||||||
|
\u7E3D\u6B21\u6578:${_.value.length}\u6B21`);s.value=[]},g=()=>{s.value=[],_.value=[],r.value=!1};return(c,l)=>r.value?(u(),n("img",{key:1,src:"https://i.imgur.com/OmkEpSv.jpg",alt:"",class:"img-fluid",onClick:g})):(u(),n("div",H,[e("div",J,[e("div",Q,[e("div",X,[e("div",Y,a(s.value[0]),1),e("div",Z,a(s.value[1]),1),e("div",ee,a(s.value[2]),1),e("div",se,a(s.value[3]),1)]),e("div",te,[(u(),n(p,null,f(10,t=>e("div",{key:t,onClick:i=>k(t-1),class:"num-btn"},a(t-1),9,ue)),64))]),e("div",le,[r.value?(u(),n("div",{key:0,class:"btn-customer reset-btn",onClick:g},"RESET")):(u(),n(p,{key:1},[e("div",{class:"btn-customer back-btn col-6",onClick:l[0]||(l[0]=t=>s.value.pop())},"BACK"),e("div",{class:"btn-customer enter-btn col-6",onClick:b},"ENTER")],64))])]),e("div",ne,[ce,e("ul",oe,[(u(!0),n(p,null,f(_.value,(t,i)=>(u(),n("li",{class:"list-group-item mx-auto",key:i},[e("div",ae,[(u(!0),n(p,null,f(t.number,m=>(u(),n("div",{class:y("num-block bg-"+t.status[m]),key:m},a(m),3))),128)),e("h3",re,a(t.status),1)])]))),128))])])])]))}});var _e=B(ie,[["__scopeId","data-v-92108812"]]);const de={class:"d-flex justify-content-center m-2 mb-5"},ve=["onClick"],me=$({setup(d){const v=h(["\u731C\u6578\u5B57(Wordle)","\u731C\u6578\u5B57(AB)"]),o=h("\u731C\u6578\u5B57(Wordle)");return(s,_)=>(u(),n("div",null,[e("div",de,[(u(!0),n(p,null,f(v.value,(r,k)=>(u(),n("button",{key:k,type:"button",class:y(`btn btn-${o.value!==r?"outline-":""}danger me-2`),onClick:b=>o.value=r},a(r),11,ve))),128))]),o.value==="\u731C\u6578\u5B57(Wordle)"?(u(),F(P,{key:0})):E("",!0),o.value==="\u731C\u6578\u5B57(AB)"?(u(),F(_e,{key:1})):E("",!0)]))}});var ke=B(me,[["__scopeId","data-v-56bac710"]]);export{ke as default};
|
1
assets/Home.b58b65e8.js
Normal file
1
assets/Home.b58b65e8.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
var A=Object.defineProperty;var x=(u,a,s)=>a in u?A(u,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[a]=s;var v=(u,a,s)=>(x(u,typeof a!="symbol"?a+"":a,s),s);import{r as B}from"./record.faac3df9.js";import{_ as C,l as k}from"./CreateRecordModalButton.e30c1d0f.js";import{C as M}from"./index.e0544e65.js";import{S as E}from"./Spinner.5acc2245.js";import{f as S,x as h,o as F,c as N,h as t,j as P,t as r,O as w,p as V,l as D}from"./vendor.495b01ec.js";const Y={key:0},$={class:"d-flex mb-3",style:{width:"100vw"}},I={class:"list-group list-group-checkable"},U={class:"list-group-item py-3 mb-3"},j={class:"row"},z={class:"col-7 text-start"},H=D(" \u672C\u6708\u7E3D\u984D \uFF04"),L={class:"progress mt-2",style:{height:"20px"}},O=["aria-valuenow"],R={class:"col-5 text-start"},T={class:"list-group-item py-3 mb-3"},q={class:"row"},G={class:"col-7 text-start"},J=D(" \u4E0A\u6708\u7E3D\u984D \uFF04"),K={class:"progress mt-2",style:{height:"20px"}},Q=["aria-valuenow"],W={class:"col-5 text-start"},ot=S({setup(u){class a{constructor(){v(this,"total");v(this,"closedAmount");v(this,"rate")}}const s=h(!0),p=h([]),o=h(new a),l=h(new a),y=async function(){try{const{data:e}=await B.getAll();p.value=e.data;const n=new Date().getFullYear(),c=new Date().getMonth()+1;o.value=f(n,c),l.value=f(c-1===0?n-1:n,c-1===0?12:c-1),s.value=!1}catch(e){console.error("error",e)}},f=(e,n)=>{var g;const c=(g=p.value)==null?void 0:g.filter(i=>new Date(i.date).getFullYear()===e&&new Date(i.date).getMonth()+1===n);let d=0,_=0;for(let i of c)d+=i.amount,i.isClosed===!0&&(_+=i.amount);let m;return d===0?m=0:m=Math.round(_/d)*100,{total:d,closedAmount:_,rate:m}};y();const b=async()=>{try{const e={to:["Ub3557f7c812e4e78293959fe4fccd414","Ue5746fb7f35d2322a698d62dc9c9a21d"],messages:{type:"text",text:"\u5361\u6BD4\u89BA\u5F97\u4FC3\u54AA\uFF01"}};await k.push(e),M("Speak","\u6309\u6211\u4E86 \u4F60\u662F\u7B28\u86CB")}catch(e){console.error("error",e)}};return(e,n)=>s.value?(F(),V(E,{key:1})):(F(),N("div",Y,[t("div",$,[P(C,{view:"Home",class:"me-3"}),t("button",{type:"button",class:"btn btn-danger me-3",onClick:b},"\u7B28\u86CB\u624D\u6309\u6211")]),t("div",I,[t("label",U,[t("div",j,[t("div",z,[t("h5",null,[H,t("strong",null,r(o.value.total),1)]),t("div",L,[t("div",{class:"progress-bar",role:"progressbar",style:w(`width: ${o.value.rate}%`),"aria-valuenow":o.value.rate,"aria-valuemin":"0","aria-valuemax":"100"},r(o.value.rate)+"% ",13,O)])]),t("div",R,[t("div",null,"\u672A\u7D50\u7B97\uFF04 "+r(o.value.total-o.value.closedAmount),1),t("div",null,"\u5DF2\u7D50\u7B97\uFF04 "+r(o.value.closedAmount),1)])])]),t("label",T,[t("div",q,[t("div",G,[t("h5",null,[J,t("strong",null,r(l.value.total),1)]),t("div",K,[t("div",{class:"progress-bar",role:"progressbar",style:w(`width: ${l.value.rate}%`),"aria-valuenow":l.value.rate,"aria-valuemin":"0","aria-valuemax":"100"},r(l.value.rate)+"% ",13,Q)])]),t("div",W,[t("div",null,"\u672A\u7D50\u7B97\uFF04 "+r(l.value.total-l.value.closedAmount),1),t("div",null,"\u5DF2\u7D50\u7B97\uFF04 "+r(l.value.closedAmount),1)])])])])]))}});export{ot as default};
|
1
assets/Login.8ea55626.js
Normal file
1
assets/Login.8ea55626.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{f as C,K as f,q as g,x as d,o as h,c as v,h as o,m as B,y as p,z as m,L as w,A as E,B as b,M as y}from"./vendor.495b01ec.js";import{_ as F}from"./logo2.e884e5c2.js";import{_ as A,T as i}from"./index.e0544e65.js";const l=u=>(E("data-v-cd2950d6"),u=u(),b(),u),x={class:"m-auto",style:{width:"70vw"}},I=l(()=>o("img",{src:F,alt:"",width:"150",height:"150"},null,-1)),k=l(()=>o("h1",{class:"h3 mb-3 fw-normal"},"\u81ED\u5EFA\u55B5\u8A18\u5E33 Login",-1)),D={class:"form-floating"},K=l(()=>o("label",{for:"email-login"},"\u4FE1\u7BB1",-1)),L={class:"form-floating"},M=["onKeyup"],S=l(()=>o("label",{for:"password-login"},"\u5BC6\u78BC",-1)),T=C({setup(u){const r=f(),_=g(),n=d(""),a=d(""),c=()=>{if(!n.value||!a.value)return i.fire({icon:"warning",title:"\u4FE1\u7BB1\u3001\u5BC6\u78BC\u70BA\u5FC5\u586B\u9078\u9805\uFF01"});y(_,n.value,a.value).then(s=>{const e=s.user;i.fire({icon:"success",title:`\u6B61\u8FCE[${e.displayName}]\u9032\u5165\u8C6C\u8C6C\u4E16\u754C\u{1F437}`}),r.push({name:"Home"})}).catch(s=>{const e=s.code,t=s.message;console.log("error",e,t),i.fire({icon:"error",title:"\u8C6C\u8C6C\u4E16\u754C\u4E0D\u6B61\u8FCE\u4F60 \u2620\uFE0F"})})};return(s,e)=>(h(),v("div",null,[o("button",{class:"btn btn-info register-btn",type:"button",onClick:e[0]||(e[0]=t=>B(r).push({name:"Register"}))},"\u524D\u5F80\u8A3B\u518A"),o("div",x,[o("form",null,[I,k,o("div",D,[p(o("input",{type:"email",class:"form-control",id:"email-login","onUpdate:modelValue":e[1]||(e[1]=t=>n.value=t),autocomplete:"on"},null,512),[[m,n.value]]),K]),o("div",L,[p(o("input",{type:"password",class:"form-control",id:"password-login","onUpdate:modelValue":e[2]||(e[2]=t=>a.value=t),autocomplete:"on",onKeyup:w(c,["enter"])},null,40,M),[[m,a.value]]),S]),o("button",{class:"w-100 btn btn-lg mt-3",type:"button",onClick:c,style:{color:"white","background-color":"coral"}}," \u9032\u5165\u8C6C\u8C6C\u4E16\u754C ")])])]))}});var U=A(T,[["__scopeId","data-v-cd2950d6"]]);export{U as default};
|
1
assets/Login.d0192f29.css
Normal file
1
assets/Login.d0192f29.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
.register-btn[data-v-cd2950d6]{position:fixed;top:1em;right:1em}
|
1
assets/Logs.4ace55bd.js
Normal file
1
assets/Logs.4ace55bd.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/Logs.d7f33462.css
Normal file
1
assets/Logs.d7f33462.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
#records[data-v-e4c5480a]:hover{cursor:pointer;color:salmon}li[data-v-e4c5480a]:hover{cursor:pointer}@media screen and (max-width: 499px){#pc[data-v-e4c5480a]{display:none}}@media screen and (min-width: 500px){#mobile[data-v-e4c5480a]{display:none}}
|
1
assets/NotFound.52f07c53.js
Normal file
1
assets/NotFound.52f07c53.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e}from"./index.e0544e65.js";import{o as t,c as o,h as r}from"./vendor.495b01ec.js";const s={},c=r("img",{src:"https://www.lifewire.com/thmb/-zkZkHWjYJ1eAIRKzvAksPDMrzg=/3000x2000/filters:no_upscale():max_bytes(150000):strip_icc()/404-not-found-error-explained-2622936-Final-fde7be1b7e2e499c9f039d97183e7f52.jpg",alt:"404",style:{height:"70vh",width:"70vw"}},null,-1),n=[c];function a(i,_){return t(),o("div",null,n)}var f=e(s,[["render",a]]);export{f as default};
|
51
assets/Permission.25be350c.js
Normal file
51
assets/Permission.25be350c.js
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import{d as F,u as v,T as d,_ as y}from"./index.e0544e65.js";import{S as A}from"./Spinner.5acc2245.js";import{f as _,i as E,g as C,o as a,c as u,S as w,x as b,C as g,h as o,j as h,F as x,k as P,t as f,p as $}from"./vendor.495b01ec.js";const k=_({setup(m){const i=["\u67E5\u770B","\u65B0\u589E","\u7DE8\u8F2F","\u522A\u9664","\u505C\u7528","\u64CD\u4F5C"],r=E("refetchPermissions"),n=C(()=>{let e='<select class="form-select" id="swal-action">';return i.forEach(t=>e+=`<option value="${t}">${t}</option>`),e+="</select>",e}),c=async()=>{try{const{value:e}=await F.fire({title:"\u65B0\u589E\u6B0A\u9650",html:`
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-action" class="col-form-label">ACTION</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
${n.value}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-item" class="col-form-label">ITEM</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" id="swal-item" class="form-control" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-description" class="col-form-label">DESCRIPTION</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" id="swal-description" class="form-control" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,preConfirm:()=>{const t=document.getElementById("swal-action").value,s=document.getElementById("swal-item").value,p=document.getElementById("swal-description").value;return(!t||!s)&&w.showValidationMessage("\u9664\u4E86[DESCRIPTION]\uFF0C\u6240\u6709\u6B04\u4F4D\u90FD\u662F\u5FC5\u586B\uFF01"),{input:{action:t,item:s,description:p}}}});e&&l(e)}catch(e){console.error("error",e)}},l=async function(e){try{await v.permission.create(e.input),r(),d.fire({icon:"success",title:"\u6210\u529F\u5EFA\u7ACB\u6B0A\u9650\uFF01"})}catch(t){console.error("error",t),d.fire({icon:"error",title:"\u65B0\u589E\u6B0A\u9650\u5931\u6557\uFF01"})}};return(e,t)=>(a(),u("button",{type:"button",class:"btn btn-primary",onClick:c},"\u65B0\u589E\u6B0A\u9650"))}});const D=_({props:{permission:null},setup(m){const i=m,r=["\u67E5\u770B","\u65B0\u589E","\u7DE8\u8F2F","\u522A\u9664","\u505C\u7528","\u64CD\u4F5C"],n=E("refetchPermissions"),c=C(()=>{let t='<select class="form-select" id="swal-action">';return r.forEach(s=>{s===i.permission.action?t+=`<option selected value="${s}">${s}</option>`:t+=`<option value="${s}">${s}</option>`}),t+="</select>",t}),l=async()=>{try{const t=i.permission,{value:s}=await F.fire({title:"\u7DE8\u8F2F\u6B0A\u9650",html:`
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-action" class="col-form-label">ACTION</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
${c.value}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-item" class="col-form-label">ITEM</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input value="${t.item}" type="text" id="swal-item" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-description" class="col-form-label">DESCRIPTION</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input value="${t.description===null?"":t.description}" type="text" id="swal-description" class="form-control" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,preConfirm:()=>{const p=document.getElementById("swal-action").value,B=document.getElementById("swal-item").value,I=document.getElementById("swal-description").value;return(!p||!B)&&w.showValidationMessage("\u9664\u4E86[DESCRIPTION]\uFF0C\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01"),{input:{action:p,item:B,description:I}}}});s&&e(s)}catch(t){console.error("error",t)}},e=async function(t){try{const{data:s}=await v.permission.edit(i.permission.id,t.input);if(s.status!=="success")throw new Error(`[SERVER ERROR] ${s.message}`);n(),d.fire({icon:"success",title:`\u6210\u529F\u7DE8\u8F2F\u6B0A\u9650[${s.data.action}-${s.data.item}]`})}catch(s){console.error("error",s),d.fire({icon:"error",title:"\u7DE8\u8F2F\u6B0A\u9650\u5931\u6557\uFF01"})}};return(t,s)=>(a(),u("i",{class:"fas fa-edit",onClick:l}))}});var R=y(D,[["__scopeId","data-v-7a0ff386"]]);const T=_({props:{permission:null},setup(m){const i=m,r=E("refetchPermissions"),n=async()=>{try{const{isConfirmed:l}=await F.fire({title:`\u78BA\u5B9A\u522A\u9664\u6B0A\u9650[${i.permission.action}-${i.permission.item}]\u561B\uFF1F`,showCancelButton:!0});l&&c(i.permission.id)}catch(l){console.error("error",l)}},c=async function(l){try{const{data:e}=await v.permission.delete(l);if(e.status!=="success")throw new Error(`[SERVER ERROR] ${e.message}`);r(),d.fire({icon:"success",title:`\u6210\u529F\u522A\u9664\u6B0A\u9650[${e.data.action}-${e.data.item}]`})}catch(e){console.error("error",e),d.fire({icon:"error",title:"\u522A\u9664\u6B0A\u9650\u5931\u6557\uFF01"})}};return(l,e)=>(a(),u("i",{class:"fas fa-trash",onClick:n}))}});var S=y(T,[["__scopeId","data-v-3846beed"]]);const N={key:0},O={class:"d-flex my-3"},M={key:0,class:"table table-striped table-danger table-hover"},V=o("thead",null,[o("tr",null,[o("th",{scope:"col"},"ID"),o("th",{scope:"col"},"ACTION"),o("th",{scope:"col"},"ITEM"),o("th",{scope:"col"},"DESCRIPTION"),o("th",{scope:"col"},"#")])],-1),j={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},z=_({setup(m){const i=b(!0),r=b([]),n=async function(){try{const{data:c}=await v.permission.getAll();r.value=c.data,i.value=!1}catch(c){console.error("error",c)}};return n(),g("refetchPermissions",n),(c,l)=>i.value?(a(),$(A,{key:1})):(a(),u("div",N,[o("div",O,[h(k)]),r.value.length?(a(),u("table",M,[V,o("tbody",null,[(a(!0),u(x,null,P(r.value,(e,t)=>(a(),u("tr",{key:t},[o("td",null,f(e.id),1),o("td",null,f(e.action),1),o("td",null,f(e.item),1),o("td",null,f(e.description),1),o("td",null,[h(R,{permission:e},null,8,["permission"]),h(S,{permission:e,class:"ms-2"},null,8,["permission"])])]))),128))])])):(a(),u("img",j))]))}});export{z as default};
|
1
assets/Permission.3c9c7f92.css
Normal file
1
assets/Permission.3c9c7f92.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
i[data-v-7a0ff386]:hover{color:#1ec539;cursor:pointer}i[data-v-3846beed]:hover{color:#e21313;cursor:pointer}
|
35
assets/Record.598ee635.js
Normal file
35
assets/Record.598ee635.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/Record.e0b853ce.css
Normal file
1
assets/Record.e0b853ce.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
i[data-v-0dbb6de0]:hover{color:#1ec539;cursor:pointer}i[data-v-841b8e8a]:hover{color:#e21313;cursor:pointer}span[data-v-072f01d7]{margin-top:.1em}i[class~=fa-edit][data-v-072f01d7]:hover{color:#1ec539;cursor:pointer}@media screen and (max-width: 400px){#column-item[data-v-072f01d7]{display:none}}
|
1
assets/Register.19cfce96.css
Normal file
1
assets/Register.19cfce96.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
.login-btn[data-v-0e827606]{position:fixed;top:1em;right:1em}
|
1
assets/Register.6118c7d7.js
Normal file
1
assets/Register.6118c7d7.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{f as _,K as f,x as v,o as g,c as h,h as e,m as B,y as l,z as i,A as w,B as F}from"./vendor.495b01ec.js";import{_ as b}from"./logo2.e884e5c2.js";import{_ as y,F as C,T as n,u as p}from"./index.e0544e65.js";const u=a=>(w("data-v-0e827606"),a=a(),F(),a),U={class:"m-auto",style:{width:"70vw"}},A=u(()=>e("img",{src:b,alt:"",width:"150",height:"150"},null,-1)),D=u(()=>e("h1",{class:"h3 mb-3 fw-normal"},"\u81ED\u5EFA\u55B5\u8A18\u5E33 Register",-1)),R={class:"form-floating"},x=u(()=>e("label",{for:"name-register"},"\u540D\u7A31",-1)),E={class:"form-floating"},I=u(()=>e("label",{for:"photoUrl-register"},"\u5927\u982D\u8CBC(url)",-1)),L={class:"form-floating"},N=u(()=>e("label",{for:"email-register"},"\u4FE1\u7BB1",-1)),k={class:"form-floating"},V=u(()=>e("label",{for:"password-register"},"\u5BC6\u78BC",-1)),S=_({setup(a){const d=f(),t=v(new C),m=async()=>{try{const{displayName:r,email:o,password:s}=t.value;if(!r||!o||!s)return n.fire({icon:"warning",title:"\u540D\u7A31\u3001\u4FE1\u7BB1\u3001\u5BC6\u78BC\u70BA\u5FC5\u586B\u9078\u9805\uFF01"});if(s.length<6)return n.fire({icon:"warning",title:"\u5BC6\u78BC\u81F3\u5C11\u89816\u4F4D\uFF01"});const{data:c}=await p.user.firebase_email_register(t.value);await p.user.create({email:t.value.email,displayName:t.value.displayName,photoURL:t.value.photoURL,firebaseUid:c.data.uid}),n.fire({icon:"success",title:"\u8A3B\u518A\u6210\u529F\uFF01"}),d.push({name:"Login"})}catch(r){console.error("error",r),n.fire({icon:"error",title:"\u8A3B\u518A\u5931\u6557\uFF01"})}};return(r,o)=>(g(),h("div",null,[e("button",{class:"btn btn-info login-btn",type:"button",onClick:o[0]||(o[0]=s=>B(d).push({name:"Login"}))},"\u524D\u5F80\u767B\u5165"),e("div",U,[e("form",null,[A,D,e("div",R,[l(e("input",{type:"text",class:"form-control",id:"name-register","onUpdate:modelValue":o[1]||(o[1]=s=>t.value.displayName=s),autocomplete:"on"},null,512),[[i,t.value.displayName]]),x]),e("div",E,[l(e("input",{type:"url",class:"form-control",id:"photoUrl-register","onUpdate:modelValue":o[2]||(o[2]=s=>t.value.photoURL=s),autocomplete:"on"},null,512),[[i,t.value.photoURL]]),I]),e("div",L,[l(e("input",{type:"email",class:"form-control",id:"email-register","onUpdate:modelValue":o[3]||(o[3]=s=>t.value.email=s),autocomplete:"on"},null,512),[[i,t.value.email]]),N]),e("div",k,[l(e("input",{type:"password",class:"form-control",id:"password-register","onUpdate:modelValue":o[4]||(o[4]=s=>t.value.password=s),autocomplete:"on"},null,512),[[i,t.value.password]]),V]),e("button",{class:"w-100 btn btn-lg mt-3",type:"button",onClick:m,style:{color:"white","background-color":"mediumaquamarine"}}," \u53D6\u5F97\u9032\u5165\u8C6C\u8C6C\u4E16\u754C\u7684\u9580\u7968 ")])])]))}});var K=y(S,[["__scopeId","data-v-0e827606"]]);export{K as default};
|
35
assets/Role.3adec45e.js
Normal file
35
assets/Role.3adec45e.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import{d as h,u as p,T as i,_ as b}from"./index.e0544e65.js";import{S as E}from"./Spinner.5acc2245.js";import{f as v,i as F,o as n,c,S as D,x as y,C as w,r as B,h as s,j as f,F as x,k,t as _,w as C,p as R}from"./vendor.495b01ec.js";const g=v({setup(d){const a=F("refetchRoles"),r=async()=>{try{const{value:o}=await h.fire({title:"\u65B0\u589E\u89D2\u8272",html:`
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-name" class="col-form-label">\u4E2D\u6587\u540D\u7A31</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" id="swal-name" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-nameEn" class="col-form-label">\u82F1\u6587\u540D\u7A31</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" id="swal-nameEn" class="form-control" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,preConfirm:()=>{const e=document.getElementById("swal-name").value,t=document.getElementById("swal-nameEn").value;return(!e||!t)&&D.showValidationMessage("\u6240\u6709\u6B04\u4F4D\u90FD\u662F\u5FC5\u586B\uFF01"),{input:{name:e,name_en:t}}}});o&&u(o)}catch(o){console.error("error",o)}},u=async function(o){try{await p.role.create(o.input),a(),i.fire({icon:"success",title:"\u6210\u529F\u5EFA\u7ACB\u89D2\u8272\uFF01"})}catch(e){console.error("error",e),i.fire({icon:"error",title:"\u65B0\u589E\u89D2\u8272\u5931\u6557\uFF01"})}};return(o,e)=>(n(),c("button",{type:"button",class:"btn btn-primary",onClick:r},"\u65B0\u589E\u89D2\u8272"))}});const A=v({props:{role:null},setup(d){const a=d,r=F("refetchRoles"),u=async()=>{try{const e=a.role,{value:t}=await h.fire({title:"\u89D2\u8272\u7DE8\u8F2F",html:`
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-name" class="col-form-label">\u4E2D\u6587\u540D\u7A31</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input value="${e.name}" type="text" id="swal-name" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
|
<div class="col-auto me-3">
|
||||||
|
<label for="swal-nameEn" class="col-form-label">\u82F1\u6587\u540D\u7A31</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input value="${e.name_en}" type="text" id="swal-nameEn" class="form-control" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,preConfirm:()=>{const l=document.getElementById("swal-name").value,m=document.getElementById("swal-nameEn").value;return(!l||!m)&&D.showValidationMessage("\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01"),{id:e.id,input:{name:l,name_en:m}}}});t&&o(t)}catch(e){console.error("error",e)}},o=async function(e){try{await p.role.edit(e.id,e.input),r(),i.fire({icon:"success",title:"\u6210\u529F\u7DE8\u8F2F\u89D2\u8272\uFF01"})}catch(t){console.error("error",t),i.fire({icon:"error",title:"\u7DE8\u8F2F\u89D2\u8272\u5931\u6557\uFF01"})}};return(e,t)=>(n(),c("i",{class:"fas fa-edit",onClick:u}))}});var I=b(A,[["__scopeId","data-v-e57c2fb4"]]);const $=v({props:{role:null},setup(d){const a=d,r=F("refetchRoles"),u=async()=>{try{const{isConfirmed:e}=await h.fire({title:`\u78BA\u5B9A\u522A\u9664\u89D2\u8272[${a.role.name}]\u561B\uFF1F`,showCancelButton:!0});e&&o(a.role.id)}catch(e){console.error("error",e)}},o=async function(e){try{const{data:t}=await p.role.delete(e);if(t.status!=="success")throw new Error(`[SERVER ERROR] ${t.message}`);r(),i.fire({icon:"success",title:`\u6210\u529F\u522A\u9664\u89D2\u8272[${t.data.name}]`})}catch(t){console.error("error",t),i.fire({icon:"error",title:"\u522A\u9664\u89D2\u8272\u5931\u6557\uFF01"})}};return(e,t)=>(n(),c("i",{class:"fas fa-trash",onClick:u}))}});var V=b($,[["__scopeId","data-v-4544867f"]]);const M={key:0},S={class:"d-flex my-3"},j={key:0,class:"table table-striped table-danger table-hover"},L=s("thead",null,[s("tr",null,[s("th",{scope:"col"},"ID"),s("th",{scope:"col"},"\u4E2D\u6587\u540D\u7A31"),s("th",{scope:"col"},"\u82F1\u6587\u540D\u7A31"),s("th",{scope:"col"},"\u555F\u7528"),s("th",{scope:"col"},"#")])],-1),N=s("i",{class:"fa-solid fa-circle-question"},null,-1),P={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},X=v({setup(d){const a=y(!0),r=y([]),u=async function(){try{const{data:o}=await p.role.getAll();r.value=o.data,a.value=!1}catch(o){console.error("error",o)}};return u(),w("refetchRoles",u),(o,e)=>{const t=B("router-link");return a.value?(n(),R(E,{key:1})):(n(),c("div",M,[s("div",S,[f(g)]),r.value.length?(n(),c("table",j,[L,s("tbody",null,[(n(!0),c(x,null,k(r.value,(l,m)=>(n(),c("tr",{key:m},[s("td",null,_(l.id),1),s("td",null,_(l.name),1),s("td",null,_(l.name_en),1),s("td",null,_(l.deletedAt===null?"V":"X"),1),s("td",null,[f(t,{to:{name:"Admin-Role-Access",params:{id:l.id}}},{default:C(()=>[N]),_:2},1032,["to"]),f(I,{role:l,class:"ms-2"},null,8,["role"]),f(V,{role:l,class:"ms-2"},null,8,["role"])])]))),128))])])):(n(),c("img",P))]))}}});export{X as default};
|
1
assets/Role.d4565b5d.css
Normal file
1
assets/Role.d4565b5d.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
i[data-v-e57c2fb4]:hover{color:#1ec539;cursor:pointer}i[data-v-4544867f]:hover{color:#e21313;cursor:pointer}
|
1
assets/Spinner.0a3c7a4a.css
Normal file
1
assets/Spinner.0a3c7a4a.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
.spinner[data-v-3833833e]{padding-top:100px}.bouncing-loader[data-v-3833833e]{display:flex;justify-content:center}.bouncing-loader>div[data-v-3833833e]{width:1rem;height:1rem;margin:3rem .2rem;background:#921aff;border-radius:50%;animation:bouncing-loader-3833833e .6s infinite alternate}.bouncing-loader>div[data-v-3833833e]:nth-child(2){animation-delay:.2s}.bouncing-loader>div[data-v-3833833e]:nth-child(3){animation-delay:.4s}@keyframes bouncing-loader-3833833e{0%{opacity:1;transform:translateY(0)}to{opacity:.1;transform:translateY(-1rem)}}
|
1
assets/Spinner.5acc2245.js
Normal file
1
assets/Spinner.5acc2245.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as s}from"./index.e0544e65.js";import{o as _,c,A as t,B as a,h as o}from"./vendor.495b01ec.js";const n={},r=e=>(t("data-v-3833833e"),e=e(),a(),e),d={class:"spinner"},i=r(()=>o("div",{class:"bouncing-loader"},[o("div"),o("div"),o("div")],-1)),p=[i];function v(e,l){return _(),c("div",d,p)}var f=s(n,[["render",v],["__scopeId","data-v-3833833e"]]);export{f as S};
|
1
assets/Tools.da9ee16f.js
Normal file
1
assets/Tools.da9ee16f.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{f as r,x as n,o as i,c,h as e,y as s,z as a}from"./vendor.495b01ec.js";const d={class:"input-group"},v=e("span",{class:"input-group-text"},"\u8A08\u7B97\u6A5F",-1),x=r({setup(m){const t=n(),u=n(),p=()=>{t.value=t.value+u.value,u.value=void 0};return(f,o)=>(i(),c("div",null,[e("div",null,[e("div",d,[v,s(e("input",{type:"number",class:"form-control","onUpdate:modelValue":o[0]||(o[0]=l=>t.value=l)},null,512),[[a,t.value]]),s(e("input",{type:"number",class:"form-control","onUpdate:modelValue":o[1]||(o[1]=l=>u.value=l)},null,512),[[a,u.value]]),e("span",{class:"input-group-text",onClick:p},"\u52A0\u7E3D")])])]))}});export{x as default};
|
1
assets/dateFilter.34232561.js
Normal file
1
assets/dateFilter.34232561.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{f as F,i as x,r as b,o as f,c,h as a,m as o,y as p,R as _,F as d,k as v,t as k,j as y}from"./vendor.495b01ec.js";import{f as m,d as n}from"./dateFormat.26b8f760.js";const V={class:"d-flex m-2 ms-3"},E={class:"form-check me-3"},C=a("label",{class:"form-check-label",for:"flexRadioDefault1"},"\u6708\u4EFD\u641C\u5C0B",-1),S={class:"form-check"},B=a("label",{class:"form-check-label",for:"flexRadioDefault2"},"\u65E5\u671F\u641C\u5C0B",-1),R={key:0,class:"d-flex mb-3"},M={class:"ms-3 my-auto"},w=["value"],U={class:"ms-3 my-auto"},$=["value"],j={key:1,class:"d-flex mb-3"},A={class:"ms-3 my-auto"},g=a("div",{class:"mx-2 my-auto"},"\uFF5E",-1),N={class:"my-auto"},T=F({setup(D){const e=x("dateFilterData"),u=i=>m(i),t=i=>{i===null?e.value.filter.startDate="":e.value.filter.startDate=m(i)},l=i=>{i===null?e.value.filter.finishDate="":e.value.filter.finishDate=m(i)};return(i,r)=>{const h=b("Datepicker");return f(),c(d,null,[a("div",V,[a("div",E,[a("input",{class:"form-check-input",type:"radio",name:"flexRadioDefault",id:"flexRadioDefault1",onClick:r[0]||(r[0]=s=>o(e).searchMode="\u6708\u4EFD"),checked:""}),C]),a("div",S,[a("input",{class:"form-check-input",type:"radio",name:"flexRadioDefault",id:"flexRadioDefault2",onClick:r[1]||(r[1]=s=>o(e).searchMode="\u65E5\u671F")}),B])]),o(e).searchMode==="\u6708\u4EFD"?(f(),c("div",R,[a("div",M,[p(a("select",{class:"form-select","aria-label":"Default select example","onUpdate:modelValue":r[2]||(r[2]=s=>o(e).filter.year=s)},[(f(),c(d,null,v(100,s=>a("option",{key:s,value:s+2020},k(s+2020)+"\u5E74",9,w)),64))],512),[[_,o(e).filter.year]])]),a("div",U,[p(a("select",{class:"form-select","aria-label":"Default select example","onUpdate:modelValue":r[3]||(r[3]=s=>o(e).filter.month=s)},[(f(),c(d,null,v(12,s=>a("option",{key:s,value:s},k(s)+"\u6708",9,$)),64))],512),[[_,o(e).filter.month]])])])):(f(),c("div",j,[a("div",A,[y(h,{modelValue:o(e).filter.startDate,"onUpdate:modelValue":t,format:u,previewFormat:u,enableTimePicker:!1,autoApply:""},null,8,["modelValue"])]),g,a("div",N,[y(h,{modelValue:o(e).filter.finishDate,"onUpdate:modelValue":l,format:u,previewFormat:u,enableTimePicker:!1,autoApply:""},null,8,["modelValue"])])]))],64)}}}),L=(D,e)=>{const{searchMode:u,filter:t}=D;return u==="\u6708\u4EFD"?e.filter(l=>n(l.date).isSame(`${t.year}-${t.month}`,"month")):!t.startDate&&!t.finishDate?[]:t.startDate&&!t.finishDate?e.filter(l=>n(l.date).isSameOrAfter(t.startDate)):!t.startDate&&t.finishDate?e.filter(l=>n(l.date).isSameOrBefore(t.finishDate)):e.filter(l=>n(l.date).isBetween(t.startDate,t.finishDate)||n(l.date).isSame(n(t.startDate))||n(l.date).isSame(n(t.finishDate)))};export{T as _,L as d};
|
1
assets/dateFormat.26b8f760.js
Normal file
1
assets/dateFormat.26b8f760.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/favicon.90f8b31e.ico
Normal file
BIN
assets/favicon.90f8b31e.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
17
assets/index.c240cc1c.css
Normal file
17
assets/index.c240cc1c.css
Normal file
File diff suppressed because one or more lines are too long
1
assets/index.e0544e65.js
Normal file
1
assets/index.e0544e65.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/karol.27263ac1.png
Normal file
BIN
assets/karol.27263ac1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
BIN
assets/logo2.c2cebf1e.png
Normal file
BIN
assets/logo2.c2cebf1e.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
1
assets/logo2.e884e5c2.js
Normal file
1
assets/logo2.e884e5c2.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
var s="/assets/logo2.c2cebf1e.png";export{s as _};
|
1
assets/record.faac3df9.js
Normal file
1
assets/record.faac3df9.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{a as r}from"./index.e0544e65.js";var l={getAll(){return r.get("/record/all")},getOne(e){return r.get(`/record/${e}`)},create(e){return r.post("/record/create",e)},edit(e,t){return r.put(`/record/edit/${e}`,t)},delete(e){return r.delete(`/record/delete/${e}`)},close(e){return r.put("/close",e)},getLogs(){return r.get("/log/all")}};export{l as r};
|
1442
assets/vendor.495b01ec.js
Normal file
1442
assets/vendor.495b01ec.js
Normal file
File diff suppressed because one or more lines are too long
41
index.html
Normal file
41
index.html
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
|
||||||
|
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico" /> -->
|
||||||
|
<link rel="icon" href="/assets/favicon.90f8b31e.ico" />
|
||||||
|
<!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
|
||||||
|
<title>JM Expense</title>
|
||||||
|
<script src="https://kit.fontawesome.com/ccfd93e9a7.js" crossorigin="anonymous"></script>
|
||||||
|
<script type="module" crossorigin src="/assets/index.e0544e65.js"></script>
|
||||||
|
<link rel="modulepreload" href="/assets/vendor.495b01ec.js">
|
||||||
|
<link rel="stylesheet" href="/assets/index.c240cc1c.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
;(function () {
|
||||||
|
let redirect = sessionStorage.redirect
|
||||||
|
delete sessionStorage.redirect
|
||||||
|
if (redirect && redirect !== location.href) {
|
||||||
|
history.replaceState(null, null, redirect)
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
</script>
|
||||||
|
<noscript>
|
||||||
|
<!-- <strong
|
||||||
|
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please
|
||||||
|
enable it to continue.</strong
|
||||||
|
> -->
|
||||||
|
<strong
|
||||||
|
>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to
|
||||||
|
continue.</strong
|
||||||
|
>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user