department field added

This commit is contained in:
snehalathad@aissel.com 2024-05-17 11:00:34 +05:30
parent 14b75269bb
commit c74a4d957b
86 changed files with 202 additions and 1 deletions

View File

@ -11,6 +11,7 @@
"playbook_owner",
"informed_members",
"ispublished",
"department",
"column_break_ingm",
"playbook_name",
"access",
@ -90,13 +91,19 @@
{
"fieldname": "section_break_zfjq",
"fieldtype": "Section Break"
},
{
"fieldname": "department",
"fieldtype": "Select",
"label": "Department",
"options": "Engineering\nOperations\nMarketing\nHR"
}
],
"has_web_view": 1,
"index_web_pages_for_search": 1,
"is_published_field": "ispublished",
"links": [],
"modified": "2024-03-15 10:42:25.917745",
"modified": "2024-05-17 10:58:55.687864",
"modified_by": "Administrator",
"module": "Playbook",
"name": "playbooks",

View File

@ -0,0 +1 @@
import{_ as f,P as g,T as _,t as l,w as r,g as d,o,v as p,x as C,y as b,m as a,e as c,z as u,A as m,F as h,B as k}from"./vendor.8583bfd9.js";const v={name:"FontColor",props:["editor"],components:{Popover:g,Tooltip:_},methods:{setBackgroundColor(t){t.name!="Default"?this.editor.chain().focus().toggleHighlight({color:t.hex}).run():this.editor.chain().focus().unsetHighlight().run()},setForegroundColor(t){t.name!="Default"?this.editor.chain().focus().setColor(t.hex).run():this.editor.chain().focus().unsetColor().run()}},computed:{foregroundColors(){return[{name:"Default",hex:"#1F272E"},{name:"Yellow",hex:"#ca8a04"},{name:"Orange",hex:"#ea580c"},{name:"Red",hex:"#dc2626"},{name:"Green",hex:"#16a34a"},{name:"Blue",hex:"#1579D0"},{name:"Purple",hex:"#9333ea"},{name:"Pink",hex:"#db2777"}]},backgroundColors(){return[{name:"Default",hex:null},{name:"Yellow",hex:"#fef9c3"},{name:"Orange",hex:"#ffedd5"},{name:"Red",hex:"#fee2e2"},{name:"Green",hex:"#dcfce7"},{name:"Blue",hex:"#D3E9FC"},{name:"Purple",hex:"#f3e8ff"},{name:"Pink",hex:"#fce7f3"}]}}},y={class:"p-2"},B=a("div",{class:"text-sm text-gray-700"},"Text Color",-1),P={class:"mt-1 grid grid-cols-8 gap-1"},F=["aria-label","onClick"],w=a("div",{class:"mt-2 text-sm text-gray-700"},"Background Color",-1),D={class:"mt-1 grid grid-cols-8 gap-1"},T=["aria-label","onClick"];function z(t,A,j,E,R,n){const i=d("Tooltip"),x=d("Popover");return o(),l(x,{transition:"default"},{target:r(({togglePopover:e,isOpen:s})=>[p(t.$slots,"default",C(b({onClick:()=>e(),isActive:s})))]),"body-main":r(()=>[a("div",y,[B,a("div",P,[(o(!0),c(h,null,u(n.foregroundColors,e=>(o(),l(i,{class:"flex",key:e.name,text:e.name},{default:r(()=>[a("button",{"aria-label":e.name,class:"flex h-5 w-5 items-center justify-center rounded border text-base",style:m({color:e.hex}),onClick:s=>n.setForegroundColor(e)}," A ",12,F)]),_:2},1032,["text"]))),128))]),w,a("div",D,[(o(!0),c(h,null,u(n.backgroundColors,e=>(o(),l(i,{class:"flex",key:e.name,text:e.name},{default:r(()=>[a("button",{"aria-label":e.name,class:k(["flex h-5 w-5 items-center justify-center rounded border text-base text-gray-900",e.hex?"border-transparent":"border-gray-200"]),style:m({backgroundColor:e.hex}),onClick:s=>n.setBackgroundColor(e)}," A ",14,T)]),_:2},1032,["text"]))),128))])])]),_:3})}var G=f(v,[["render",z]]);export{G as default};

View File

@ -0,0 +1 @@
import{c as m,l as r,e as u,f as n,w as i,m as l,g as d,o as c,u as t}from"./vendor.8583bfd9.js";import"./index.aee3079d.js";const y={class:"mr-4 ml-4 mt-10"},b=l("h1",null,"Playbooks",-1),f={class:"flex flex-row justify-between"},_={class:"flex flex-col justify-between"},k=l("h4",null,"Playbook Name",-1),x=l("h4",null,"Playbook Owner",-1),w={class:"flex flex-col"},V=l("h4",null,"Informed Members",-1),h=l("h4",null,"Playbook Access",-1),M={setup(v){const e=m({playbookName:"",playbookOwner:"",informedMember:"",playbookAccess:"",playbookDescription:"",department:""});return r(!1),(N,o)=>{const a=d("Input"),p=d("card");return c(),u("div",y,[b,n(p,null,{default:i(()=>[l("div",f,[l("div",_,[k,n(a,{type:"text",modelValue:t(e).playbookName,"onUpdate:modelValue":o[0]||(o[0]=s=>t(e).playbookName=s),style:{width:"300px"}},null,8,["modelValue"]),x,n(a,{type:"text",modelValue:t(e).playbookOwner,"onUpdate:modelValue":o[1]||(o[1]=s=>t(e).playbookOwner=s),style:{width:"300px"}},null,8,["modelValue"])]),l("div",w,[V,n(a,{type:"text",modelValue:t(e).informedMember,"onUpdate:modelValue":o[2]||(o[2]=s=>t(e).informedMember=s),style:{width:"300px"}},null,8,["modelValue"]),h,n(a,{type:"dropdown",modelValue:t(e).playbookAccess,"onUpdate:modelValue":o[3]||(o[3]=s=>t(e).playbookAccess=s),style:{width:"300px"}},null,8,["modelValue"])])])]),_:1})])}}};export{M as default};

View File

@ -0,0 +1 @@
import{_ as p,j as I,D as _,G as D,e as g,v as h,x as v,y,f as n,w as l,F as w,g as m,o as c,m as i,H as C,J as b,q as u}from"./vendor.8583bfd9.js";const x={name:"InsertImage",props:["editor"],expose:["openDialog"],data(){return{addImageDialog:{url:"",file:null,show:!1}}},components:{Button:I,Dialog:_},methods:{openDialog(){this.addImageDialog.show=!0},onImageSelect(t){let e=t.target.files[0];!e||(this.addImageDialog.file=e,D(e).then(r=>{this.addImageDialog.url=r}))},addImage(t){this.editor.chain().focus().setImage({src:t}).run(),this.reset()},reset(){this.addImageDialog=this.$options.data().addImageDialog}}},k={class:"relative cursor-pointer rounded-lg bg-gray-100 py-1 focus-within:bg-gray-200 hover:bg-gray-200"},B={class:"absolute inset-0 select-none px-2 py-1 text-base"},S=["src"],V=u(" Insert Image "),N=u(" Cancel ");function A(t,e,r,j,a,o){const d=m("Button"),f=m("Dialog");return c(),g(w,null,[h(t.$slots,"default",v(y({onClick:o.openDialog}))),n(f,{options:{title:"Add Image"},modelValue:a.addImageDialog.show,"onUpdate:modelValue":e[2]||(e[2]=s=>a.addImageDialog.show=s),onAfterLeave:o.reset},{"body-content":l(()=>[i("label",k,[i("input",{type:"file",class:"w-full opacity-0",onChange:e[0]||(e[0]=(...s)=>o.onImageSelect&&o.onImageSelect(...s)),accept:"image/*"},null,32),i("span",B,C(a.addImageDialog.file?"Select another image":"Select an image"),1)]),a.addImageDialog.url?(c(),g("img",{key:0,src:a.addImageDialog.url,class:"mt-2 w-full rounded-lg"},null,8,S)):b("",!0)]),actions:l(()=>[n(d,{variant:"solid",onClick:e[1]||(e[1]=s=>o.addImage(a.addImageDialog.url))},{default:l(()=>[V]),_:1}),n(d,{onClick:o.reset},{default:l(()=>[N]),_:1},8,["onClick"])]),_:1},8,["modelValue","onAfterLeave"])],64)}var L=p(x,[["render",A]]);export{L as default};

View File

@ -0,0 +1 @@
import{_ as d,j as g,I as L,D as m,e as f,v as p,x as D,y as h,f as i,w as l,F as c,g as a,o as _,E as v,q as w}from"./vendor.8583bfd9.js";const x={name:"InsertLink",props:["editor"],components:{Button:g,Input:L,Dialog:m},data(){return{setLinkDialog:{url:"",show:!1}}},methods:{openDialog(){let t=this.editor.getAttributes("link").href;t&&(this.setLinkDialog.url=t),this.setLinkDialog.show=!0},setLink(t){t===""?this.editor.chain().focus().extendMarkRange("link").unsetLink().run():this.editor.chain().focus().extendMarkRange("link").setLink({href:t}).run(),this.setLinkDialog.show=!1,this.setLinkDialog.url=""},reset(){this.setLinkDialog=this.$options.data().setLinkDialog}}},V=w(" Save ");function C(t,e,y,B,n,s){const r=a("FormControl"),u=a("Button"),k=a("Dialog");return _(),f(c,null,[p(t.$slots,"default",D(h({onClick:s.openDialog}))),i(k,{options:{title:"Set Link"},modelValue:n.setLinkDialog.show,"onUpdate:modelValue":e[3]||(e[3]=o=>n.setLinkDialog.show=o),onAfterLeave:s.reset},{"body-content":l(()=>[i(r,{type:"text",label:"URL",modelValue:n.setLinkDialog.url,"onUpdate:modelValue":e[0]||(e[0]=o=>n.setLinkDialog.url=o),onKeydown:e[1]||(e[1]=v(o=>s.setLink(o.target.value),["enter"]))},null,8,["modelValue"])]),actions:l(()=>[i(u,{variant:"solid",onClick:e[2]||(e[2]=o=>s.setLink(n.setLinkDialog.url))},{default:l(()=>[V]),_:1})]),_:1},8,["modelValue","onAfterLeave"])],64)}var b=d(x,[["render",C]]);export{b as default};

View File

@ -0,0 +1 @@
import{_ as D,j as v,D as h,K as C,e as u,v as k,x,y as w,f as t,w as i,F as y,g as r,o as c,m as B,q as n,H as U,t as F,J as f}from"./vendor.8583bfd9.js";const I={name:"InsertImage",props:["editor"],expose:["openDialog"],data(){return{addVideoDialog:{url:"",file:null,show:!1}}},components:{Button:v,Dialog:h,FileUploader:C},methods:{openDialog(){this.addVideoDialog.show=!0},onVideoSelect(l){let o=l.target.files[0];!o||(this.addVideoDialog.file=o)},addVideo(l){this.editor.chain().focus().insertContent(`<video src="${l}"></video>`).run(),this.reset()},reset(){this.addVideoDialog=this.$options.data().addVideoDialog}}},N={class:"flex items-center space-x-2"},S=n(" Remove "),A=["src"],b=n(" Insert Video "),j=n("Cancel");function L(l,o,P,R,e,s){const a=r("Button"),g=r("FileUploader"),p=r("Dialog");return c(),u(y,null,[k(l.$slots,"default",x(w({onClick:s.openDialog}))),t(p,{options:{title:"Add Video"},modelValue:e.addVideoDialog.show,"onUpdate:modelValue":o[2]||(o[2]=d=>e.addVideoDialog.show=d),onAfterLeave:s.reset},{"body-content":i(()=>[t(g,{"file-types":"video/*",onSuccess:o[0]||(o[0]=d=>e.addVideoDialog.url=d.file_url)},{default:i(({file:d,progress:V,uploading:_,openFileSelector:m})=>[B("div",N,[t(a,{onClick:m},{default:i(()=>[n(U(_?`Uploading ${V}%`:e.addVideoDialog.url?"Change Video":"Upload Video"),1)]),_:2},1032,["onClick"]),e.addVideoDialog.url?(c(),F(a,{key:0,onClick:()=>{e.addVideoDialog.url=null,e.addVideoDialog.file=null}},{default:i(()=>[S]),_:2},1032,["onClick"])):f("",!0)])]),_:1}),e.addVideoDialog.url?(c(),u("video",{key:0,src:e.addVideoDialog.url,class:"mt-2 w-full rounded-lg",type:"video/mp4",controls:""},null,8,A)):f("",!0)]),actions:i(()=>[t(a,{variant:"solid",onClick:o[1]||(o[1]=d=>s.addVideo(e.addVideoDialog.url))},{default:i(()=>[b]),_:1}),t(a,{onClick:s.reset},{default:i(()=>[j]),_:1},8,["onClick"])]),_:1},8,["modelValue","onAfterLeave"])],64)}var z=D(I,[["render",L]]);export{z as default};

View File

@ -0,0 +1 @@
import{n as c,e as m,f as e,w as n,g as t,o as p,m as u,u as f,p as _,q as w}from"./vendor.8583bfd9.js";import{s as r}from"./index.aee3079d.js";const g={class:"m-3 flex flex-row items-center justify-center"},x=["onSubmit"],h=w("Login"),B=c({setup(b){function l(s){let o=new FormData(s.target);r.login.submit({email:o.get("email"),password:o.get("password")})}return(s,o)=>{const a=t("Input"),i=t("Button"),d=t("Card");return p(),m("div",g,[e(d,{title:"Login to your FrappeUI App!",class:"w-full max-w-md mt-4"},{default:n(()=>[u("form",{class:"flex flex-col space-y-2 w-full",onSubmit:_(l,["prevent"])},[e(a,{required:"",name:"email",type:"text",placeholder:"johndoe@email.com",label:"User ID"}),e(a,{required:"",name:"password",type:"password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022",label:"Password"}),e(i,{loading:f(r).login.loading,variant:"solid"},{default:n(()=>[h]),_:1},8,["loading"])],40,x)]),_:1})])}}});export{B as default};

View File

@ -0,0 +1 @@
var _=(n,r,o)=>new Promise((t,e)=>{var s=c=>{try{u(o.next(c))}catch(d){e(d)}},i=c=>{try{u(o.throw(c))}catch(d){e(d)}},u=c=>c.done?t(c.value):Promise.resolve(c.value).then(s,i);u((o=o.apply(n,r)).next())});import{c as m,r as y,a as v,b as E,d as k,_ as P,e as b,f as I,g as R,o as w,h as C,s as O,i as A,j as S,C as j,I as $,k as H}from"./vendor.8583bfd9.js";const N=function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const s of e)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&t(i)}).observe(document,{childList:!0,subtree:!0});function o(e){const s={};return e.integrity&&(s.integrity=e.integrity),e.referrerpolicy&&(s.referrerPolicy=e.referrerpolicy),e.crossorigin==="use-credentials"?s.credentials="include":e.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function t(e){if(e.ep)return;e.ep=!0;const s=o(e);fetch(e.href,s)}};N();const U="modulepreload",h={},q="/assets/playbook/frontend/",L=function(r,o){return!o||o.length===0?r():Promise.all(o.map(t=>{if(t=`${q}${t}`,t in h)return;h[t]=!0;const e=t.endsWith(".css"),s=e?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${t}"]${s}`))return;const i=document.createElement("link");if(i.rel=e?"stylesheet":U,e||(i.as="script",i.crossOrigin=""),i.href=t,document.head.appendChild(i),e)return new Promise((u,c)=>{i.addEventListener("load",u),i.addEventListener("error",c)})})).then(()=>r())},p=m({url:"frappe.auth.get_logged_user",cache:"User",onError(n){n&&n.exc_type==="AuthenticationError"&&f.push({name:"LoginPage"})}});function g(){let r=new URLSearchParams(document.cookie.split("; ").join("&")).get("user_id");return r==="Guest"&&(r=null),r}const l=y({login:m({url:"login",makeParams({email:n,password:r}){return{usr:n,pwd:r}},onSuccess(n){p.reload(),l.user=g(),l.login.reset(),f.replace(n.default_route||"/")}}),logout:m({url:"logout",onSuccess(){p.reset(),l.user=g(),f.replace({name:"Login"})}}),user:g(),isLoggedIn:v(()=>!!l.user)}),x=[{path:"/",name:"Home",component:()=>L(()=>import("./Home.c97f68fb.js"),["assets/Home.c97f68fb.js","assets/vendor.8583bfd9.js","assets/vendor.1875b906.css"])},{name:"Login",path:"/account/login",component:()=>L(()=>import("./Login.c48767f4.js"),["assets/Login.c48767f4.js","assets/vendor.8583bfd9.js","assets/vendor.1875b906.css"])}];let f=E({history:k("/frontend"),routes:x});f.beforeEach((n,r,o)=>_(void 0,null,function*(){let t=l.isLoggedIn;try{yield p.promise}catch(e){t=!1}n.name==="Login"&&t?o({name:"Home"}):n.name!=="Login"&&!t?o({name:"Login"}):o()}));const B={};function V(n,r){const o=R("router-view");return w(),b("div",null,[I(o)])}var D=P(B,[["render",V]]);let a=C(D);O("resourceFetcher",H);a.use(f);a.use(A);a.component("Button",S);a.component("Card",j);a.component("Input",$);a.mount("#app");export{l as s};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.form-select{background-image:url("data:image/svg+xml;utf8,<svg fill='none' width='8' xmlns='http://www.w3.org/2000/svg' viewBox='-4 -2 16 16'><path d='M4.5 3.636 6.136 2l1.637 1.636M4.5 8.364 6.136 10l1.637-1.636' stroke='%23333C44' stroke-linecap='round' stroke-linejoin='round'/></svg>")}.spinner[data-v-d1174afc]{-webkit-animation:rotate-d1174afc 2s linear infinite;animation:rotate-d1174afc 2s linear infinite}.spinner-path[data-v-d1174afc]{stroke-linecap:round;-webkit-animation:dash-d1174afc 1.5s ease-in-out infinite;animation:dash-d1174afc 1.5s ease-in-out infinite}@-webkit-keyframes rotate-d1174afc{to{transform:rotate(360deg)}}@keyframes rotate-d1174afc{to{transform:rotate(360deg)}}@-webkit-keyframes dash-d1174afc{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:120,150;stroke-dashoffset:-124}}@keyframes dash-d1174afc{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:120,150;stroke-dashoffset:-124}}.item{display:block;margin:0;width:100%;text-align:left;background:transparent;border-radius:.4rem;border:1px solid transparent;padding:.2rem .4rem}.item.is-selected{border-color:#000}.ProseMirror{outline:none;caret-color:#171717;word-break:break-word}.ProseMirror-focused:focus-visible{outline:none}.ProseMirror:not(.ProseMirror-focused) p.is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:#999;pointer-events:none;height:0}.ProseMirror-selectednode video,img.ProseMirror-selectednode{outline:2px solid #E2E2E2}.mention{font-weight:600;-webkit-box-decoration-break:clone;box-decoration-break:clone}.prose table p{margin:0}.ProseMirror table .selectedCell:after{z-index:2;position:absolute;content:"";inset:0;pointer-events:none;background:#E3F1FD;opacity:.3}.ProseMirror table .column-resize-handle{position:absolute;right:-1px;top:0;bottom:-2px;width:4px;background-color:#e3f1fd;pointer-events:none}.resize-cursor{cursor:ew-resize;cursor:col-resize}.ProseMirror mark{border-radius:3px;padding:0 2px}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/assets/playbook/frontend/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Frappe UI App</title>
<script type="module" crossorigin src="/assets/playbook/frontend/assets/index.aee3079d.js"></script>
<link rel="modulepreload" href="/assets/playbook/frontend/assets/vendor.8583bfd9.js">
<link rel="stylesheet" href="/assets/playbook/frontend/assets/vendor.1875b906.css">
<link rel="stylesheet" href="/assets/playbook/frontend/assets/index.bb8e54b5.css">
</head>
<body>
<div id="app"></div>
<div id="modals"></div>
<div id="popovers"></div>
<script>
window.csrf_token = '{{ frappe.session.csrf_token }}'
</script>
</body>
</html>