315 lines
		
	
	
		
			9.7 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			315 lines
		
	
	
		
			9.7 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| "use strict";
 | |
| (() => {
 | |
| var exports = {};
 | |
| exports.id = 8021;
 | |
| exports.ids = [8021];
 | |
| exports.modules = {
 | |
| 
 | |
| /***/ 5740:
 | |
| /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
 | |
| 
 | |
| // ESM COMPAT FLAG
 | |
| __webpack_require__.r(__webpack_exports__);
 | |
| 
 | |
| // EXPORTS
 | |
| __webpack_require__.d(__webpack_exports__, {
 | |
|   "default": () => (/* binding */ UsersPage),
 | |
|   "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: ./functions/backend/suAdminUserAuth.js
 | |
| var suAdminUserAuth = __webpack_require__(1503);
 | |
| var suAdminUserAuth_default = /*#__PURE__*/__webpack_require__.n(suAdminUserAuth);
 | |
| // EXTERNAL MODULE: ./layouts/SuAdminLayout.jsx + 2 modules
 | |
| var SuAdminLayout = __webpack_require__(8282);
 | |
| // EXTERNAL MODULE: ./components/su/components/UserCard.jsx
 | |
| var UserCard = __webpack_require__(1336);
 | |
| ;// CONCATENATED MODULE: ./components/su/SuNewUserContent.jsx
 | |
| // @ts-check
 | |
| /**
 | |
|  * ==============================================================================
 | |
|  * Imports
 | |
|  * ==============================================================================
 | |
|  */ 
 | |
| 
 | |
| 
 | |
| /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
 | |
|  * ==============================================================================
 | |
|  * Main Component { Functional }
 | |
|  * ==============================================================================
 | |
|  * @param {Object} props - Server props
 | |
|  * @param {any} props.data
 | |
|  */ function SuNewUserContent({ data  }) {
 | |
|     /**
 | |
|      * 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__*/ jsx_runtime_.jsx((external_react_default()).Fragment, {
 | |
|         children: /*#__PURE__*/ (0,jsx_runtime_.jsxs)("section", {
 | |
|             className: "items-start justify-start p-6",
 | |
|             children: [
 | |
|                 /*#__PURE__*/ jsx_runtime_.jsx("div", {
 | |
|                     className: "flex flex-row items-center w-full gap-20 mb-6 justify-between",
 | |
|                     children: /*#__PURE__*/ jsx_runtime_.jsx("h2", {
 | |
|                         className: "text-xl m-0",
 | |
|                         children: "New User"
 | |
|                     })
 | |
|                 }),
 | |
|                 /*#__PURE__*/ jsx_runtime_.jsx("section", {
 | |
|                     className: "paper",
 | |
|                     children: /*#__PURE__*/ jsx_runtime_.jsx("h2", {
 | |
|                         className: "text-base m-0",
 | |
|                         children: "Info"
 | |
|                     })
 | |
|                 })
 | |
|             ]
 | |
|         })
 | |
|     });
 | |
| ////////////////////////////////////////
 | |
| ////////////////////////////////////////
 | |
| ////////////////////////////////////////
 | |
| } /** ****************************************************************************** */  /** ****************************************************************************** */  /** ****************************************************************************** */  /** ****************************************************************************** */  /** ****************************************************************************** */  /** ****************************************************************************** */ 
 | |
| 
 | |
| ;// CONCATENATED MODULE: ./pages/su/users/new.jsx
 | |
| // @ts-check
 | |
| /**
 | |
|  * ==============================================================================
 | |
|  * Imports
 | |
|  * ==============================================================================
 | |
|  */ 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
 | |
|  * ==============================================================================
 | |
|  * Main Component { Functional }
 | |
|  * ==============================================================================
 | |
|  * @param {Object} props - Server props
 | |
|  * @param {import("@/package-shared/types").UserType} props.user
 | |
|  * @param {any} props.data
 | |
|  */ function UsersPage({ user , data  }) {
 | |
|     /**
 | |
|      * Get Contexts
 | |
|      *
 | |
|      * @abstract { React.useContext }
 | |
|      */ ////////////////////////////////////////
 | |
|     ////////////////////////////////////////
 | |
|     ////////////////////////////////////////
 | |
|     /**
 | |
|      * Javascript Variables
 | |
|      *
 | |
|      * @abstract Non hook variables and functions
 | |
|      */ const pageTitle = "User Dashboard | Datasquirel";
 | |
|     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 ... }
 | |
|      */ ////////////////////////////////////////
 | |
|     ////////////////////////////////////////
 | |
|     ////////////////////////////////////////
 | |
|     /**
 | |
|      * Function Return
 | |
|      *
 | |
|      * @abstract Main Function Return
 | |
|      */ return /*#__PURE__*/ jsx_runtime_.jsx(SuAdminLayout/* default */.Z, {
 | |
|         head: head,
 | |
|         user: user,
 | |
|         children: /*#__PURE__*/ jsx_runtime_.jsx(SuNewUserContent, {
 | |
|             data: data
 | |
|         })
 | |
|     });
 | |
| }
 | |
| /**
 | |
|  * @type {import("next").GetServerSideProps}
 | |
|  */ async function getServerSideProps({ req , res , query  }) {
 | |
|     /**
 | |
|      * User Auth
 | |
|      *
 | |
|      * @description User Auth
 | |
|      */ const suAdminUser = await suAdminUserAuth_default()(req);
 | |
|     if (!suAdminUser?.logged_in_status) {
 | |
|         return {
 | |
|             redirect: {
 | |
|                 destination: `/su/login`,
 | |
|                 permanent: false
 | |
|             }
 | |
|         };
 | |
|     }
 | |
|     ////////////////////////////////////////
 | |
|     ////////////////////////////////////////
 | |
|     ////////////////////////////////////////
 | |
|     /**
 | |
|      * Server props return
 | |
|      *
 | |
|      * @description Return data fetched on the server side
 | |
|      */ return {
 | |
|         props: {
 | |
|             user: suAdminUser
 | |
|         }
 | |
|     };
 | |
| ////////////////////////////////////////
 | |
| ////////////////////////////////////////
 | |
| ////////////////////////////////////////
 | |
| }
 | |
| 
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 9318:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("@mui/icons-material/BackupTwoTone");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 386:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("@mui/icons-material/CottageTwoTone");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 6817:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("@mui/icons-material/DocumentScannerTwoTone");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 6094:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("@mui/icons-material/ErrorTwoTone");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 6547:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("@mui/icons-material/LockPersonTwoTone");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 5557:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("@mui/icons-material/MenuBookTwoTone");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 8245:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("@mui/icons-material/PeopleAltTwoTone");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 415:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("@mui/icons-material/TerminalTwoTone");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 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");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 4300:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("buffer");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 6113:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("crypto");
 | |
| 
 | |
| /***/ }),
 | |
| 
 | |
| /***/ 3685:
 | |
| /***/ ((module) => {
 | |
| 
 | |
| module.exports = require("http");
 | |
| 
 | |
| /***/ })
 | |
| 
 | |
| };
 | |
| ;
 | |
| 
 | |
| // load runtime
 | |
| var __webpack_require__ = require("../../../webpack-runtime.js");
 | |
| __webpack_require__.C(exports);
 | |
| var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
 | |
| var __webpack_exports__ = __webpack_require__.X(0, [4017,8313,5304,1503,5313,1336], () => (__webpack_exec__(5740)));
 | |
| module.exports = __webpack_exports__;
 | |
| 
 | |
| })(); | 
