2024-11-05 11:12:42 +00:00
"use strict" ;
( ( ) => {
var exports = { } ;
exports . id = 1838 ;
exports . ids = [ 1838 ] ;
exports . modules = {
/***/ 3931 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
"UsersContext" : ( ) => ( /* binding */ UsersContext ) ,
"default" : ( ) => ( /* binding */ Dashboard ) ,
"getServerSideProps" : ( ) => ( /* binding */ getServerSideProps )
} ) ;
// EXTERNAL MODULE: external "react/jsx-runtime"
var jsx _runtime _ = _ _webpack _require _ _ ( 997 ) ;
// EXTERNAL MODULE: external "react"
var external _react _ = _ _webpack _require _ _ ( 6689 ) ;
var external _react _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _react _ ) ;
// EXTERNAL MODULE: ./layouts/AdminLayout.jsx + 2 modules
var AdminLayout = _ _webpack _require _ _ ( 4858 ) ;
// EXTERNAL MODULE: ./functions/backend/userAuth.js
var userAuth = _ _webpack _require _ _ ( 370 ) ;
var userAuth _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( userAuth ) ;
// EXTERNAL MODULE: ./components/admin/users/TargetUserPreviewPopup.jsx
var TargetUserPreviewPopup = _ _webpack _require _ _ ( 9417 ) ;
// EXTERNAL MODULE: ./components/general/Breadcrumbs.jsx
var Breadcrumbs = _ _webpack _require _ _ ( 424 ) ;
// EXTERNAL MODULE: ./components/admin/users/UserListCard.jsx
var UserListCard = _ _webpack _require _ _ ( 3863 ) ;
; // CONCATENATED MODULE: ./components/admin/users/UsersList.jsx
// @ts-check
/ * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Imports
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* /
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ / * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Main Component { Functional }
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* @ param { Object } props - Server props
* @ param { import ( "@/package-shared/types" ) . UserType } props . user
* @ param { React . Dispatch < React . SetStateAction < import ( "@/package-shared/types" ) . MYSQL _user _users _table _def | null >> } props . setTargetUser
* @ param { import ( "@/package-shared/types" ) . MYSQL _user _users _table _def [ ] } [ props . users ]
* @ param { any [ ] } props . adminUsers
* @ param { any [ ] } props . invitedAccounts
* / f u n c t i o n U s e r s L i s t ( { u s e r , s e t T a r g e t U s e r , u s e r s , a d m i n U s e r s , i n v i t e d A c c o u n t s , } ) {
/ * *
* Get Contexts
*
* @ abstract { React . useContext }
* / / ///////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Javascript Variables
*
* @ abstract Non hook variables and functions
* / / ///////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* React Hooks
*
* @ abstract { useState , useEffect , useRef , etc ... }
* / / ///////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Function Return
*
* @ abstract Main Function Return
* / return / * # _ _PURE _ _ * / j s x _ r u n t i m e _ . j s x ( ( e x t e r n a l _ r e a c t _ d e f a u l t ( ) ) . F r a g m e n t , {
children : /*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "section" , {
className : "paper" ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "h2" , {
className : "text-xl m-0" ,
children : "Users List"
} ) ,
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "card no-hover items-center w-full justify-between" ,
children : [
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "gap-2" ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "div" , {
className : "w-10 h-10 rounded-full overflow-hidden" ,
children : /*#__PURE__*/ jsx _runtime _ . jsx ( "img" , {
src : user . image _thumbnail ,
alt : "Main User Image" ,
width : 40 ,
className : "w-full h-full object-cover"
} )
} ) ,
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "span" , {
className : "font-semibold" ,
children : [
user . first _name ,
" " ,
user . last _name
]
} )
]
} ) ,
/*#__PURE__*/ jsx _runtime _ . jsx ( "span" , {
className : "text-sm font-semibold" ,
children : "Super User (Owner)"
} )
]
} ) ,
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "w-full flex-col items-stretch" ,
children : [
invitedAccounts && invitedAccounts [ 0 ] && /*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( ( external _react _default ( ) ) . Fragment , {
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "h4" , {
className : "m-0 text-sm font-semibold text-slate-400" ,
children : "Accounts that Invited you"
} ) ,
invitedAccounts . map ( ( userObject , index ) => {
return /*#__PURE__*/ jsx _runtime _ . jsx ( UserListCard /* default */ . Z , {
userObject : userObject ,
setTargetUser : setTargetUser ,
paradigm : "invited"
} , index + 1 ) ;
} )
]
} ) ,
adminUsers && adminUsers [ 0 ] && /*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( ( external _react _default ( ) ) . Fragment , {
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "h4" , {
className : "m-0 text-sm font-semibold text-slate-400" ,
children : "Accounts you Invited"
} ) ,
adminUsers . map ( ( userObject , index ) => {
return /*#__PURE__*/ jsx _runtime _ . jsx ( UserListCard /* default */ . Z , {
userObject : userObject ,
setTargetUser : setTargetUser
} , index + 1 ) ;
} )
]
} )
]
} )
]
} )
} ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */
// EXTERNAL MODULE: ./functions/frontend/fetchApi.js
var fetchApi = _ _webpack _require _ _ ( 6729 ) ;
// EXTERNAL MODULE: ./components/general/LoadingBlock.jsx
var LoadingBlock = _ _webpack _require _ _ ( 5264 ) ;
; // CONCATENATED MODULE: ./components/admin/users/InvitationReceivedCard.jsx
// @ts-check
/ * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Imports
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* /
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ / * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Main Component { Functional }
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* @ param { Object } props - Server props
* @ param { any } props . invitationObject
* / f u n c t i o n I n v i t a t i o n R e c e i v e d C a r d ( { i n v i t a t i o n O b j e c t } ) {
/ * *
* Get Contexts
*
* @ abstract { React . useContext }
* / / ///////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Javascript Variables
*
* @ abstract Non hook variables and functions
* / / ///////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* React Hooks
*
* @ abstract { useState , useEffect , useRef , etc ... }
* / c o n s t [ l o a d i n g , s e t L o a d i n g ] = e x t e r n a l _ r e a c t _ d e f a u l t ( ) . u s e S t a t e ( f a l s e ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Function Return
*
* @ abstract Main Function Return
* / return / * # _ _PURE _ _ * / ( 0 , j s x _ r u n t i m e _ . j s x s ) ( " d i v " , {
className : "bg-slate-100 px-4 py-2 rounded w-full justify-between relative" ,
children : [
loading && /*#__PURE__*/ jsx _runtime _ . jsx ( LoadingBlock /* default */ . Z , {
width : "20px"
} ) ,
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "span" , {
className : "text-sm font-semibold" ,
children : [
invitationObject . first _name ,
" " ,
invitationObject . last _name ,
" (" ,
invitationObject . email ,
")"
]
} ) ,
/*#__PURE__*/ jsx _runtime _ . jsx ( "button" , {
className : "py-1.5 px-3 text-sm secondary" ,
onClick : ( e ) => {
setLoading ( true ) ;
( 0 , fetchApi /* default */ . Z ) ( "/api/acceptUserInvitation" , {
method : "post" ,
body : {
... invitationObject
}
} , true ) . then ( ( res ) => {
if ( res . success ) {
window . alert ( "Invitation Accepted!" ) ;
window . location . reload ( ) ;
}
setTimeout ( ( ) => {
setLoading ( false ) ;
} , 500 ) ;
} ) ;
} ,
children : "Accept Invitation"
} )
]
} , invitationObject . id ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */
; // CONCATENATED MODULE: ./components/admin/users/UsersContent.jsx
// @ts-check
/ * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Imports
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* /
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ / * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Main Component { Functional }
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* @ param { Object } props - Server props
* / f u n c t i o n U s e r s C o n t e n t ( p r o p s ) {
/ * *
* Get Contexts
*
* @ abstract { React . useContext }
* / c o n s t { u s e r , d a t a b a s e s , p e n d i n g I n v i t a t i o n s , p e n d i n g I n v i t a t i o n s R e c e i v e d , a d m i n U s e r s , i n v i t e d A c c o u n t s , s e t T a r g e t U s e r , } = e x t e r n a l _ r e a c t _ d e f a u l t ( ) . u s e C o n t e x t ( U s e r s C o n t e x t ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Javascript Variables
*
* @ abstract Non hook variables and functions
* / / ///////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* React Hooks
*
* @ abstract { useState , useEffect , useRef , etc ... }
* / c o n s t [ l o a d i n g , s e t L o a d i n g ] = e x t e r n a l _ r e a c t _ d e f a u l t ( ) . u s e S t a t e ( f a l s e ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Function Return
*
* @ abstract Main Function Return
* / return / * # _ _PURE _ _ * / ( 0 , j s x _ r u n t i m e _ . j s x s ) ( ( e x t e r n a l _ r e a c t _ d e f a u l t ( ) ) . F r a g m e n t , {
children : [
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "flex-col items-start gap-0 w-full" ,
children : [
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "w-full justify-between flex-wrap" ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "h1" , {
className : "text-3xl m-0" ,
children : "Users"
} ) ,
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "a" , {
href : ` /admin/ ${ user ? . id } /users/add-user ` ,
className : "flex items-center gap-2 whitespace-normal button" ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "span" , {
className : "symbol" ,
children : "+"
} ) ,
/*#__PURE__*/ jsx _runtime _ . jsx ( "span" , {
children : "Add New User"
} )
]
} )
]
} ) ,
/*#__PURE__*/ jsx _runtime _ . jsx ( Breadcrumbs /* default */ . Z , {
user : user
} )
]
} ) ,
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "w-full grid grid-cols-1 items-start justify-start" ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "div" , {
className : "flex-col items-stretch justify-start" ,
children : /*#__PURE__*/ jsx _runtime _ . jsx ( UsersList , {
setTargetUser : setTargetUser ,
user : user ,
adminUsers : adminUsers ,
invitedAccounts : invitedAccounts
} )
} ) ,
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "flex-col items-stretch justify-start" ,
children : [
pendingInvitations && pendingInvitations [ 0 ] && /*#__PURE__*/ jsx _runtime _ . jsx ( ( external _react _default ( ) ) . Fragment , {
children : /*#__PURE__*/ jsx _runtime _ . jsx ( "section" , {
className : "p-4 items-start gap-4 overflow-visible" ,
children : /*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "flex-col w-full items-start" ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "h2" , {
className : "text-xl m-0" ,
children : "Invitations Sent"
} ) ,
pendingInvitations . map ( ( invitationObject , index ) => {
return /*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "bg-slate-100 px-4 py-2 rounded w-full justify-between" ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "span" , {
className : "text-sm font-semibold" ,
children : invitationObject . invited _user _email
} ) ,
/*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "span" , {
className : "text-sm text-slate-400" ,
children : "Pending"
} ) ,
/*#__PURE__*/ jsx _runtime _ . jsx ( "span" , {
className : "text-sm text-orange-600 hover:opacity-50 cursor-pointer" ,
onClick : ( e ) => {
if ( window . confirm ( "Delete this invitation?" ) ) {
( 0 , fetchApi /* default */ . Z ) ( "/api/deleteInvitation" , {
method : "POST" ,
body : {
id : invitationObject . id
}
} , true ) . finally ( ( ) => {
window . location . reload ( ) ;
} ) ;
}
} ,
children : "Delete Invitation"
} )
]
} )
]
} , invitationObject . id ) ;
} )
]
} )
} )
} ) ,
pendingInvitationsReceived && pendingInvitationsReceived [ 0 ] && /*#__PURE__*/ jsx _runtime _ . jsx ( ( external _react _default ( ) ) . Fragment , {
children : /*#__PURE__*/ jsx _runtime _ . jsx ( "section" , {
className : "p-4 items-start gap-4 overflow-visible" ,
children : /*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( "div" , {
className : "flex-col w-full items-start" ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "h2" , {
className : "text-xl m-0" ,
children : "Pending Invitations Received"
} ) ,
pendingInvitationsReceived . map ( ( invitationObject , index ) => {
return /*#__PURE__*/ jsx _runtime _ . jsx ( InvitationReceivedCard , {
invitationObject : invitationObject
} , index + 1 ) ;
} )
]
} )
} )
} )
]
} )
]
} )
]
} ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
} /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */
// EXTERNAL MODULE: ./package-shared/utils/backend/global-db/DB_HANDLER.js
var DB _HANDLER = _ _webpack _require _ _ ( 9395 ) ;
var DB _HANDLER _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( DB _HANDLER ) ;
; // CONCATENATED MODULE: ./pages/admin/[user_id]/users/index.jsx
// @ts-check
/ * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Imports
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* /
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/** ****************************************************************************** */ /** @type {import("@/package-shared/types").AllUserUsersContextType} */ // @ts-ignore
const init = { } ;
const UsersContext = /*#__PURE__*/ external _react _default ( ) . createContext ( init ) ;
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ / * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Main Component { Functional }
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* @ param { Object } props - Server props
* @ param { import ( "@/package-shared/types" ) . UserType } props . user
* @ param { import ( "@/package-shared/types" ) . MYSQL _delegated _users _table _def [ ] } props . users
* @ param { import ( "@/package-shared/types" ) . DSQL _MYSQL _user _databases _Type [ ] } props . databases
* @ param { import ( "@/package-shared/types" ) . MYSQL _invitations _table _def [ ] } props . pendingInvitations
* @ param { any [ ] } props . pendingInvitationsReceived
* @ param { any [ ] } props . adminUsers
* @ param { any [ ] } props . invitedAccounts
* / f u n c t i o n D a s h b o a r d ( { u s e r , u s e r s , d a t a b a s e s , p e n d i n g I n v i t a t i o n s , p e n d i n g I n v i t a t i o n s R e c e i v e d , a d m i n U s e r s , i n v i t e d A c c o u n t s , } ) {
/ * *
* Get Contexts
*
* @ abstract { React . useContext }
* / / ///////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Javascript Variables
*
* @ abstract Non hook variables and functions
* / c o n s t p a g e T i t l e = " U s e r s | D a t a s q u i r e l " ;
const pageDescription = "Welcome to your data app" ;
let head = /*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( jsx _runtime _ . Fragment , {
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( "title" , {
children : pageTitle
} ) ,
/*#__PURE__*/ jsx _runtime _ . jsx ( "meta" , {
name : "description" ,
content : pageDescription
} )
]
} ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* React Hooks
*
* @ abstract { useState , useEffect , useRef , etc ... }
* / c o n s t [ n e w U s e r , s e t N e w U s e r ] = e x t e r n a l _ r e a c t _ d e f a u l t ( ) . u s e S t a t e ( n u l l ) ;
/** @type {[ targetUser: import("@/package-shared/types").MYSQL_user_users_table_def | null, setTargetUser: React.Dispatch<React.SetStateAction<import("@/package-shared/types").MYSQL_user_users_table_def | null>> ]} */ // @ts-ignore
const [ targetUser , setTargetUser ] = external _react _default ( ) . useState ( null ) ;
/** @type {[ media: any, setTargetMedia: React.Dispatch<React.SetStateAction<any>> ]} */ // @ts-ignore
const [ media , setTargetMedia ] = external _react _default ( ) . useState ( null ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Function Return
*
* @ abstract Main Function Return
* / return / * # _ _PURE _ _ * / jsx_runtime_.jsx(AdminLayout/ * default * / . Z , {
head : head ,
user : user ,
children : /*#__PURE__*/ ( 0 , jsx _runtime _ . jsxs ) ( UsersContext . Provider , {
value : {
user ,
users ,
targetUser ,
setTargetUser ,
databases ,
pendingInvitations ,
pendingInvitationsReceived ,
adminUsers ,
invitedAccounts
} ,
children : [
/*#__PURE__*/ jsx _runtime _ . jsx ( UsersContent , { } ) ,
/*#__PURE__*/ jsx _runtime _ . jsx ( TargetUserPreviewPopup /* default */ . Z , {
targetUser : targetUser ,
user : user ,
setTargetUser : setTargetUser
} )
]
} )
} ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
}
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ / * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Server Side Props or Static Props
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* @ type { import ( "next" ) . GetServerSideProps }
* / a s y n c f u n c t i o n g e t S e r v e r S i d e P r o p s ( { r e q , r e s , q u e r y } ) {
/ * *
* User Auth
*
* @ description User Auth
* / c o n s t u s e r = a w a i t u s e r A u t h _ d e f a u l t ( ) ( r e q , r e s ) ;
if ( ! user ? . logged _in _status ) {
return {
redirect : {
destination : "/logout" ,
permanent : false
}
} ;
}
/ * *
* Page / Site Data Data Fetching
*
* @ description Fetch data on the server before returning
* / c o n s t u s e r s = a w a i t D B _ H A N D L E R _ d e f a u l t ( ) ( ` S E L E C T * F R O M d e l e g a t e d _ u s e r s W H E R E u s e r _ i d = ' $ { u s e r . i d } ' ` ) ;
const databases = await DB _HANDLER _default ( ) ( ` SELECT db_name,db_slug,db_image FROM user_databases WHERE user_id=' ${ user . id } ' ` ) ;
const pendingInvitations = await DB _HANDLER _default ( ) ( ` SELECT * FROM invitations WHERE inviting_user_id=' ${ user . id } ' AND invitation_status='Pending' ` ) ;
const pendingInvitationsReceived = await DB _HANDLER _default ( ) ( ` SELECT invitations.*,users.first_name,users.last_name,users.email FROM invitations JOIN users ON users.id=invitations.inviting_user_id WHERE invited_user_email=' ${ user . email } ' AND invitation_status='Pending' ` ) ;
const adminUsers = await DB _HANDLER _default ( ) ( ` SELECT * FROM user_users WHERE user_id=' ${ user . id } ' AND user_type='admin' ` ) ;
const invitedAccounts = await DB _HANDLER _default ( ) ( ` SELECT user_users.*,users.first_name AS inviteeFirstName,users.last_name AS inviteeLastName,users.email AS inviteeEmail, users.image_thumbnail AS inviteeImage FROM user_users JOIN users ON users.id=user_users.user_id WHERE user_users.email=' ${ user . email } ' AND user_users.user_type='admin' ` ) ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/ * *
* Server props return
*
* @ description Return data fetched on the server side
* / r e t u r n {
props : {
user : user ,
users : users ,
databases : databases ,
pendingInvitations ,
pendingInvitationsReceived ,
adminUsers ,
invitedAccounts
}
} ;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
}
/***/ } ) ,
/***/ 4003 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/AdminPanelSettingsTwoTone" ) ;
/***/ } ) ,
/***/ 69 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/CloudOffTwoTone" ) ;
/***/ } ) ,
/***/ 4008 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/CloudQueueRounded" ) ;
/***/ } ) ,
/***/ 7306 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/CollectionsTwoTone" ) ;
/***/ } ) ,
/***/ 386 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/CottageTwoTone" ) ;
/***/ } ) ,
/***/ 8979 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/DynamicFormTwoTone" ) ;
/***/ } ) ,
/***/ 300 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/LanguageOutlined" ) ;
/***/ } ) ,
/***/ 2814 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/LockTwoTone" ) ;
/***/ } ) ,
/***/ 5557 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/MenuBookTwoTone" ) ;
/***/ } ) ,
/***/ 9806 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/PeopleOutlineTwoTone" ) ;
/***/ } ) ,
/***/ 36 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/RefreshRounded" ) ;
/***/ } ) ,
/***/ 1799 :
/***/ ( ( module ) => {
module . exports = require ( "@mui/icons-material/SchemaTwoTone" ) ;
/***/ } ) ,
/***/ 2423 :
/***/ ( ( module ) => {
module . exports = require ( "lucide-react" ) ;
/***/ } ) ,
/***/ 968 :
/***/ ( ( module ) => {
module . exports = require ( "next/head" ) ;
/***/ } ) ,
/***/ 6689 :
/***/ ( ( module ) => {
module . exports = require ( "react" ) ;
/***/ } ) ,
/***/ 997 :
/***/ ( ( module ) => {
module . exports = require ( "react/jsx-runtime" ) ;
/***/ } ) ,
/***/ 2261 :
/***/ ( ( module ) => {
module . exports = require ( "serverless-mysql" ) ;
/***/ } ) ,
/***/ 4300 :
/***/ ( ( module ) => {
module . exports = require ( "buffer" ) ;
/***/ } ) ,
/***/ 6113 :
/***/ ( ( module ) => {
module . exports = require ( "crypto" ) ;
/***/ } ) ,
/***/ 7147 :
/***/ ( ( module ) => {
module . exports = require ( "fs" ) ;
/***/ } ) ,
/***/ 3685 :
/***/ ( ( module ) => {
module . exports = require ( "http" ) ;
/***/ } ) ,
/***/ 1017 :
/***/ ( ( module ) => {
module . exports = require ( "path" ) ;
/***/ } )
} ;
;
// load runtime
var _ _webpack _require _ _ = require ( "../../../webpack-runtime.js" ) ;
_ _webpack _require _ _ . C ( exports ) ;
var _ _webpack _exec _ _ = ( moduleId ) => ( _ _webpack _require _ _ ( _ _webpack _require _ _ . s = moduleId ) )
2024-11-05 14:18:40 +00:00
var _ _webpack _exports _ _ = _ _webpack _require _ _ . X ( 0 , [ 4017 , 8313 , 5264 , 6729 , 5449 , 913 , 4480 , 370 , 424 , 4858 , 5472 , 4114 , 9486 , 9417 , 3863 ] , ( ) => ( _ _webpack _exec _ _ ( 3931 ) ) ) ;
2024-11-05 11:12:42 +00:00
module . exports = _ _webpack _exports _ _ ;
} ) ( ) ;