2024-11-05 11:12:42 +00:00
|
|
|
"use strict";
|
|
|
|
(() => {
|
|
|
|
var exports = {};
|
|
|
|
exports.id = 8021;
|
|
|
|
exports.ids = [8021];
|
|
|
|
exports.modules = {
|
|
|
|
|
2024-11-05 14:18:40 +00:00
|
|
|
/***/ 5304:
|
|
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
|
|
|
|
// @ts-check
|
|
|
|
|
|
|
|
const { scryptSync , createDecipheriv } = __webpack_require__(6113);
|
|
|
|
const { Buffer } = __webpack_require__(4300);
|
|
|
|
/**
|
|
|
|
* @param {string} encryptedString
|
|
|
|
* @returns {string | null}
|
|
|
|
*/ const decrypt = (encryptedString)=>{
|
|
|
|
const algorithm = "aes-192-cbc";
|
|
|
|
const password = process.env.DSQL_ENCRYPTION_PASSWORD || "";
|
|
|
|
const salt = process.env.DSQL_ENCRYPTION_SALT || "";
|
|
|
|
let key = scryptSync(password, salt, 24);
|
|
|
|
let iv = Buffer.alloc(16, 0);
|
|
|
|
// @ts-ignore
|
|
|
|
const decipher = createDecipheriv(algorithm, key, iv);
|
|
|
|
try {
|
|
|
|
let decrypted = decipher.update(encryptedString, "hex", "utf8");
|
|
|
|
decrypted += decipher.final("utf8");
|
|
|
|
return decrypted;
|
|
|
|
} catch (error) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
module.exports = decrypt;
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
2024-11-05 11:12:42 +00:00
|
|
|
/***/ 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))
|
2024-11-05 14:18:40 +00:00
|
|
|
var __webpack_exports__ = __webpack_require__.X(0, [4017,8313,1503,5313,1336], () => (__webpack_exec__(5740)));
|
2024-11-05 11:12:42 +00:00
|
|
|
module.exports = __webpack_exports__;
|
|
|
|
|
|
|
|
})();
|