-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path50ef9380.0b29661b.js
1 lines (1 loc) · 5.25 KB
/
50ef9380.0b29661b.js
1
"use strict";(self.webpackChunkadminforth=self.webpackChunkadminforth||[]).push([[9053],{4969:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>o});const n=JSON.parse('{"id":"api/Back/type-aliases/BeforeDeleteSaveFunction","title":"BeforeDeleteSaveFunction()","description":"BeforeDeleteSaveFunction: (params) => Promise\\\\","source":"@site/docs/api/Back/type-aliases/BeforeDeleteSaveFunction.md","sourceDirName":"api/Back/type-aliases","slug":"/api/Back/type-aliases/BeforeDeleteSaveFunction","permalink":"/docs/api/Back/type-aliases/BeforeDeleteSaveFunction","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"apiSidebar","previous":{"title":"BeforeDataSourceRequestFunction","permalink":"/docs/api/Back/type-aliases/BeforeDataSourceRequestFunction"},"next":{"title":"BeforeEditSaveFunction","permalink":"/docs/api/Back/type-aliases/BeforeEditSaveFunction"}}');var s=r(4848),i=r(8453);const c={},l="BeforeDeleteSaveFunction()",d={},o=[{value:"Parameters",id:"parameters",level:2},{value:"Returns",id:"returns",level:2},{value:"error?",id:"error",level:3},{value:"ok",id:"ok",level:3}];function a(e){const t={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"beforedeletesavefunction",children:"BeforeDeleteSaveFunction()"})}),"\n",(0,s.jsxs)(t.blockquote,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"BeforeDeleteSaveFunction"}),": (",(0,s.jsx)(t.code,{children:"params"}),") => ",(0,s.jsx)(t.code,{children:"Promise"}),"<",(0,s.jsx)(t.code,{children:"object"}),">"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Modify record to change how data is saved to database.\nReturn ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution."}),"\n",(0,s.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Parameter"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"params"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"object"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"params.adminUser"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.a,{href:"/docs/api/Common/interfaces/AdminUser",children:(0,s.jsx)(t.code,{children:"AdminUser"})})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"params.adminforth"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.a,{href:"/docs/api/Back/interfaces/IAdminForth",children:(0,s.jsx)(t.code,{children:"IAdminForth"})})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,s.jsx)(t.code,{children:"params.extra"}),"?"]}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.a,{href:"/docs/api/Back/interfaces/HttpExtra",children:(0,s.jsx)(t.code,{children:"HttpExtra"})})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"params.record"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"any"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"params.recordId"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"any"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"params.resource"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.a,{href:"/docs/api/Back/interfaces/AdminForthResource",children:(0,s.jsx)(t.code,{children:"AdminForthResource"})})})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"returns",children:"Returns"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"Promise"}),"<",(0,s.jsx)(t.code,{children:"object"}),">"]}),"\n",(0,s.jsx)(t.h3,{id:"error",children:"error?"}),"\n",(0,s.jsxs)(t.blockquote,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"optional"})," ",(0,s.jsx)(t.strong,{children:"error"}),": ",(0,s.jsx)(t.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"ok",children:"ok"}),"\n",(0,s.jsxs)(t.blockquote,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"ok"}),": ",(0,s.jsx)(t.code,{children:"boolean"})]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>c,x:()=>l});var n=r(6540);const s={},i=n.createContext(s);function c(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]);