From 49e8ec895d467f69f8e623618c3e183389443e34 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Wed, 31 Jan 2024 22:49:08 +0530 Subject: [PATCH 01/29] fetch from latest pr --- .vscode/easycode.ignore | 13 + backend/app.js | 12 +- backend/bin/www | 4 +- backend/constants/errorMessages.js | 11 +- backend/constants/mailOption.js | 2 +- backend/middlewares/auth.js | 38 +- backend/models/achievement.js | 10 + backend/models/admin.js | 18 + backend/models/course.js | 21 + backend/models/faculty.js | 20 + backend/models/skill.js | 9 + backend/models/student.js | 41 ++ backend/package.json | 5 +- backend/resources/authResource.js | 124 ++-- backend/resources/otpResource.js | 81 ++- backend/yarn.lock | 589 ++++++++++--------- frontend/ios/Flutter/Debug.xcconfig | 1 + frontend/ios/Flutter/Release.xcconfig | 1 + frontend/lib/components/choice_selector.dart | 15 +- frontend/lib/components/snackbar.dart | 9 + frontend/lib/constants/constants.dart | 31 +- frontend/lib/constants/dummy_entries.dart | 488 +++++++-------- frontend/lib/constants/error_handling.dart | 26 + frontend/lib/models/achievement.dart | 31 + frontend/lib/models/admin.dart | 27 + frontend/lib/models/course.dart | 35 +- frontend/lib/models/faculty.dart | 38 +- frontend/lib/models/skills.dart | 27 + frontend/lib/models/student.dart | 79 ++- frontend/lib/models/student2.dart | 18 + frontend/lib/provider/admin_provider.dart | 26 +- frontend/lib/provider/courses_provider.dart | 32 +- frontend/lib/provider/faculty_provider.dart | 22 +- frontend/lib/provider/student_provider.dart | 28 +- frontend/lib/routes/routes.dart | 89 +-- frontend/lib/screens/admin/add_courses.dart | 21 +- frontend/lib/screens/admin/add_students.dart | 41 +- frontend/lib/screens/admin/view_faculty.dart | 25 +- frontend/lib/screens/auth/login_page.dart | 160 +++++ frontend/lib/services/auth/auth_service.dart | 67 +++ frontend/pubspec.lock | 8 + frontend/pubspec.yaml | 1 + 42 files changed, 1499 insertions(+), 845 deletions(-) create mode 100644 .vscode/easycode.ignore create mode 100644 backend/models/achievement.js create mode 100644 backend/models/admin.js create mode 100644 backend/models/course.js create mode 100644 backend/models/faculty.js create mode 100644 backend/models/skill.js create mode 100644 backend/models/student.js create mode 100644 frontend/lib/components/snackbar.dart create mode 100644 frontend/lib/constants/error_handling.dart create mode 100644 frontend/lib/models/achievement.dart create mode 100644 frontend/lib/models/admin.dart create mode 100644 frontend/lib/models/skills.dart create mode 100644 frontend/lib/models/student2.dart create mode 100644 frontend/lib/screens/auth/login_page.dart create mode 100644 frontend/lib/services/auth/auth_service.dart diff --git a/.vscode/easycode.ignore b/.vscode/easycode.ignore new file mode 100644 index 0000000..84722bf --- /dev/null +++ b/.vscode/easycode.ignore @@ -0,0 +1,13 @@ +node_modules/ +dist/ +vendor/ +cache/ +.*/ +*.min.* +*.test.* +*.spec.* +*.bundle.* +*.bundle-min.* +*.*.js +*.*.ts +*.log \ No newline at end of file diff --git a/backend/app.js b/backend/app.js index cc85942..3c06695 100644 --- a/backend/app.js +++ b/backend/app.js @@ -7,20 +7,24 @@ import authResource from "./resources/authResource.js"; import otpResource from "./resources/otpResource.js"; import Connection from "./database/db.js"; import bodyParser from "body-parser"; - +import cors from "cors"; +import auth from "./middlewares/auth.js"; +const PORT =`${process.env.PORT || 3000}`; const app = express(); app.use(logger("dev")); app.use(express.json()) app.use(express.urlencoded({ extended: false })); app.use(cookieParser()); +app.use(cors()); // Get Database connection Connection(); - app.use(authResource); -app.use("/signup",otpResource); -app.use("/signin",otpResource); +app.use(otpResource); app.use("/", testResource); +app.get('/protected', auth, (req, res) => { + res.json({ message: 'Access granted' }); +}); export default app; diff --git a/backend/bin/www b/backend/bin/www index ba730d9..fca8ed9 100755 --- a/backend/bin/www +++ b/backend/bin/www @@ -25,7 +25,7 @@ const server = http.createServer(app); * Listen on provided port, on all network interfaces. */ -server.listen(port); +server.listen(port,"0.0.0.0"); server.on("error", onError); server.on("listening", onListening); @@ -82,7 +82,7 @@ function onError(error) { function onListening() { const addr = server.address(); let address = addr.address; - if (address === "::" || address === "127.0.0.1" || address === "::1") { + if (address === "::" || address === "127.0.0.1" || address === "::1" || address==="0.0.0.0") { address = "localhost"; } const bind = typeof addr === "string" ? "pipe " + addr : "port " + addr.port; diff --git a/backend/constants/errorMessages.js b/backend/constants/errorMessages.js index 8992674..9629e84 100644 --- a/backend/constants/errorMessages.js +++ b/backend/constants/errorMessages.js @@ -11,9 +11,16 @@ export const databaseConnectionError = "Error while connecting with the database // OTP export const emailIsRequired = 'Email is required'; -export const failedToSendOTPEmail = 'Failed to send OTP email'; +export const failedToSendOTPEmail = 'Failed to send OTP to email'; export const emailAndOTPRequired = 'Email and OTP are required'; export const noOTPFoundForEmail = 'No OTP found for the email'; export const incorrectOTP = 'Incorrect OTP'; export const otpVerfied = 'OTP verified successfully'; -export const otpSent = 'OTP sent successfully'; \ No newline at end of file +export const otpSent = 'OTP sent successfully'; + +// Auth Middleware +export const noAuthToken = 'No auth token, access denied'; +export const invalidAuthToken = 'Invalid token'; +export const tokenVerificationFailed = 'Token verification failed, authorization denied.'; +export const invalidUserType = 'Invalid user type'; +export const tokenUpdateError= 'Error updating token'; \ No newline at end of file diff --git a/backend/constants/mailOption.js b/backend/constants/mailOption.js index 582f483..53c36c8 100644 --- a/backend/constants/mailOption.js +++ b/backend/constants/mailOption.js @@ -1,4 +1,4 @@ -export const senderEmail = 'college@gmail.com'; +export const senderEmail = 'arin.nigam@gmail.com'; export const subjectOTPLogin = 'OTP for Login'; export function createOTPEmailBody(otp) { diff --git a/backend/middlewares/auth.js b/backend/middlewares/auth.js index 12763f9..b2e0bef 100644 --- a/backend/middlewares/auth.js +++ b/backend/middlewares/auth.js @@ -1,24 +1,26 @@ import jwt from "jsonwebtoken"; -const passwordKey = proccess.env.PASSWORD_KEY; +import * as errorMessages from "../constants/errorMessages.js"; +const secretKey = process.env.ACCESS_TOKEN_SECRET; const auth = async (req, res, next) => { - try { - const token = req.header("x-auth-token"); - if (!token) - return res.status(401).json({ msg: "No auth token, access denied" }); - - const verified = jwt.verify(token, passwordKey); - if (!verified) - return res - .status(401) - .json({ msg: "Token verification failed, authorization denied." }); - - req.user = verified.id; - req.token = token; - next(); - } catch (err) { - res.status(500).json({ error: err.message }); - } + try { + const bearerHeader = req.headers['authorization']; + if(typeof bearerHeader !== 'undefined') { + const bearer = bearerHeader.split(' '); + const bearerToken = bearer[1]; + // Verify the token + jwt.verify(bearerToken, secretKey, (err, user) => { + if(err) { + res.sendStatus(403); + } else { + req.user = user; + next(); + } + }); + } + } catch (error) { + res.status(500).json({ error: err.message }); + } }; export default auth; diff --git a/backend/models/achievement.js b/backend/models/achievement.js new file mode 100644 index 0000000..c00e26d --- /dev/null +++ b/backend/models/achievement.js @@ -0,0 +1,10 @@ +import mongoose from 'mongoose'; + +const achievementSchema = new mongoose.Schema({ + name: { type: String, required: true }, + date: { type: Date, required: true }, + description: { type: String, required: true }, +}); + +const Achievement = mongoose.model('Achievement', achievementSchema); +export default Achievement; \ No newline at end of file diff --git a/backend/models/admin.js b/backend/models/admin.js new file mode 100644 index 0000000..142623d --- /dev/null +++ b/backend/models/admin.js @@ -0,0 +1,18 @@ +import mongoose from "mongoose"; + +const adminSchema = new mongoose.Schema({ + name: { + type: String, + default: 'Smart Insti User' + }, + email: { + type: String, + required: true, + unique: true + }, +}); + +const Admin = mongoose.model('Admin', adminSchema); + +export default Admin; + diff --git a/backend/models/course.js b/backend/models/course.js new file mode 100644 index 0000000..592fb5f --- /dev/null +++ b/backend/models/course.js @@ -0,0 +1,21 @@ +import mongoose from 'mongoose'; + +const courseSchema = new mongoose.Schema({ + name: { + type: String, + required: true + }, + courseCode: { + type: String, + required: true, + unique: true + }, + branches: [{ + type: String, + required: true + }] +}); + +const Course = mongoose.model('Course', courseSchema); + +export default Course; \ No newline at end of file diff --git a/backend/models/faculty.js b/backend/models/faculty.js new file mode 100644 index 0000000..0913954 --- /dev/null +++ b/backend/models/faculty.js @@ -0,0 +1,20 @@ +import mongoose from 'mongoose'; + +const facultySchema = new mongoose.Schema({ + name: { + type: String, + default: 'Smart Insti User' + }, + email: { + type: String, + required: true, + unique: true + }, + courses: [{ + type: mongoose.Schema.Types.ObjectId, + ref: 'Course' + }], +}); + +const Faculty = mongoose.model('Faculty', facultySchema); +export default Faculty; \ No newline at end of file diff --git a/backend/models/skill.js b/backend/models/skill.js new file mode 100644 index 0000000..95b90ed --- /dev/null +++ b/backend/models/skill.js @@ -0,0 +1,9 @@ +import mongoose from 'mongoose'; + +const skillSchema = new mongoose.Schema({ + name: { type: String, required: true }, + level: { type: Number, required: true }, +}); + +const Skill = mongoose.model('Skill', skillSchema); +export default Skill; \ No newline at end of file diff --git a/backend/models/student.js b/backend/models/student.js new file mode 100644 index 0000000..0f79321 --- /dev/null +++ b/backend/models/student.js @@ -0,0 +1,41 @@ +import mongoose from 'mongoose'; +const studentSchema = new mongoose.Schema({ + name: { + type: String, + default: 'Smart Insti User' + }, + email: { + type: String, + required: true + }, + rollNumber: { + type: String, + }, + about: { + type: String, + }, + profilePicURI: { + type: String, + }, + branch: { + type: String, + }, + graduationYear: { + type: Number, + }, + skills: [{ + type: mongoose.Schema.Types.ObjectId, + ref: 'Skill' + }], + achievements: [{ + type: mongoose.Schema.Types.ObjectId, + ref: 'Achievement' + }], + roles: { + type: [String], + } +}); + +const Student = mongoose.model('Student', studentSchema); + +export default Student; diff --git a/backend/package.json b/backend/package.json index b863e18..3a539d8 100644 --- a/backend/package.json +++ b/backend/package.json @@ -12,6 +12,7 @@ "bcryptjs": "^2.4.3", "body-parser": "^1.20.2", "cookie-parser": "~1.4.4", + "cors": "^2.8.5", "debug": "^4.3.4", "dotenv": "^16.3.2", "express": "~4.16.1", @@ -22,6 +23,8 @@ "multer": "^1.4.5-lts.1", "nodemailer": "^6.9.8", "nodemon": "^3.0.3", - "pug": "2.0.0-beta11" + "pug": "2.0.0-beta11", + "xoauth2": "^1.2.0", + "yarn": "^1.22.21" } } diff --git a/backend/resources/authResource.js b/backend/resources/authResource.js index d728e67..09f7def 100644 --- a/backend/resources/authResource.js +++ b/backend/resources/authResource.js @@ -1,62 +1,90 @@ +import mongoose from 'mongoose'; import express from 'express'; import User from "../models/user.js"; import bcryptjs from 'bcryptjs'; import jwt from 'jsonwebtoken'; -import auth from '../middlewares/auth.js'; import * as errorMessages from '../constants/errorMessages.js'; +import Student from '../models/Student.js'; +import Faculty from '../models/faculty.js'; +import Admin from '../models/admin.js'; const authRouter = express.Router(); -// Sign-Up Route -authRouter.post('/signup',async (req,res)=>{ - try { - const { name, email, password } = req.body; - const existingUser = await User.findOne({ email }); - if (existingUser){ - return res.status(400).json({ msg: errorMessages.userAlreadyExists }); - } - const hashedPassword = await bcryptjs.hash(password,8); - let user = new User({ - email, - password: hashedPassword, - name, - }); - user = await user.save(); - res.json(user); - } catch (e) { - res.status(500).json({error:e.message}); - } -}) - -// Sign-In Route -authRouter.post("/signin", async (req, res) => { - try { - const { email, password } = req.body; - - const user = await User.findOne({ email }); - if (!user) { - return res - .status(400) - .json({ msg: errorMessages.userNotFound }); - } - - const isMatch = await bcryptjs.compare(password, user.password); +// // Sign-Up Route +// authRouter.post('/signup',async (req,res)=>{ +// try { +// const { name, email, password } = req.body; +// const existingUser = await User.findOne({ email }); +// if (existingUser){ +// return res.status(400).json({ msg: errorMessages.userAlreadyExists }); +// } +// const hashedPassword = await bcryptjs.hash(password,8); +// let user = new User({ +// email, +// password: hashedPassword, +// name, +// }); +// user = await user.save(); +// res.json(user); +// } catch (e) { +// res.status(500).json({error:e.message}); +// } +// }) + +// // Sign-In Route +// authRouter.post("/signin", async (req, res) => { +// try { +// const { email, password } = req.body; + +// const user = await User.findOne({ email }); +// if (!user) { +// return res +// .status(400) +// .json({ msg: errorMessages.userNotFound }); +// } + +// const isMatch = await bcryptjs.compare(password, user.password); - if (!isMatch) { - return res.status(400).json({ msg: errorMessages.incorrectPassword }); - } - - const token = jwt.sign({ id: user._id }, "passwordKey"); - res.json({ token, ...user._doc }); - } catch (e) { - res.status(500).json({ error: errorMessages.internalServerError }); +// if (!isMatch) { +// return res.status(400).json({ msg: errorMessages.incorrectPassword }); +// } + +// const token = jwt.sign({ id: user._id }, "passwordKey"); +// res.json({ token, ...user._doc }); +// } catch (e) { +// res.status(500).json({ error: errorMessages.internalServerError }); +// } +// }); + +authRouter.post('/login', async (req, res) => { + const { email, userType } = req.body; + const token = jwt.sign({ email,userType }, process.env.ACCESS_TOKEN_SECRET, { expiresIn: '1h' }); + let userCollection; + let existingUser; + + switch(userType) { + case 'student': + userCollection = Student; + break; + case 'faculty': + userCollection = Faculty; + break; + case 'admin': + userCollection = Admin; + break; + default: + return res.status(400).send({ error: 'Invalid user type' }); } -}); + + existingUser = await userCollection.findOne({ email }); -// Get user Data -authRouter.get("/", auth, async (req, res) => { - const user = await User.findById(req.user); - res.json({ ...user._doc, token: req.token }); + if (!existingUser) { + const newUser = new userCollection({ email }); + await newUser.save(); + res.send({ message: 'User created successfully', user: newUser }); + } else { + res.send({ message: 'User already exists' }); + } }); export default authRouter \ No newline at end of file diff --git a/backend/resources/otpResource.js b/backend/resources/otpResource.js index fdec89f..498f697 100644 --- a/backend/resources/otpResource.js +++ b/backend/resources/otpResource.js @@ -1,37 +1,32 @@ import express from 'express' import nodemailer from 'nodemailer' import dotenv from 'dotenv' +import { MongoClient } from 'mongodb'; +import jwt from 'jsonwebtoken'; import * as errorConstants from '../constants/errorMessages.js'; import * as mailOption from '../constants/mailOption.js'; -const otpRouter = express.Router(); +const otpRouter = express.Router(); dotenv.config(); -// Nodemailer configuration using Ethereal -async function getTestAccount() { - return nodemailer.createTestAccount(); -} - // Generate a random 4-digit OTP function generateOTP() { return Math.floor(1000 + Math.random() * 9000).toString(); } -// Nodemailer configuration const transporter = nodemailer.createTransport({ - // Create an ethereal account and replace it in .env file - host: process.env.SMTP_HOST, - port: process.env.SMTP_PORT, + service: "Gmail", + host: "smtp.gmail.com", + port: 465, + secure: false, auth: { user: process.env.SMTP_USER, - pass: process.env.SMTP_PASS, + pass: process.env.SMTP_PASSWORD, }, }); -import { MongoClient } from 'mongodb'; - // Connection URI for your MongoDB database -const uri = process.env.MONGODB_URI; // Change this to your actual MongoDB connection URI +const uri = process.env.MONGODB_URI; // Create a new MongoClient const client = new MongoClient(uri); @@ -45,36 +40,14 @@ const otpStorage = new Map(); otpRouter.post('/send-otp', async (req, res) => { const { email } = req.body; - if (!email) { return res.status(400).json({ error: errorConstants.emailIsRequired }); } - // Generate OTP const otp = generateOTP(); - console.log(otp); + // Store OTP with the associated email otpStorage.set(email, otp); - - try { - // Connect to the MongoDB server - await client.connect(); - - // Use a specific database - const database = client.db(dbName); - - // Use a specific collection - const collection = database.collection(collectionName); - await collection.deleteMany({ - email:email, - }); - await collection.insertOne({ email, otp}); - console.log('OTP data stored in MongoDB'); - } finally { - // Close the connection when done - await client.close(); - } - // Nodemailer options const mailOptions = { from: mailOption.senderEmail, to: email, @@ -85,10 +58,30 @@ otpRouter.post('/send-otp', async (req, res) => { // Send mail transporter.sendMail(mailOptions, (error, info) => { if (error) { + console.log(error); return res.status(500).json({ error: errorConstants.failedToSendOTPEmail }); } - res.json({ message: errorConstants.otpSent, email }); + else{ + console.log('Message sent: %s', info.response); + res.json({ message: errorConstants.otpSent, email }); + } }); + + // Connect to the MongoDB server + try { + await client.connect(); + const database = client.db(dbName); + const collection = database.collection(collectionName); + await collection.deleteMany({ + email:email, + }); + + await collection.insertOne({ email, otp}); + console.log('OTP data stored in MongoDB'); + + } finally { + await client.close(); + } }); otpRouter.post('/verify-otp', async (req, res) => { @@ -100,11 +93,9 @@ otpRouter.post('/verify-otp', async (req, res) => { try { await client.connect(); - + const database = client.db(dbName); const collection = database.collection(collectionName); - - // Retrieve stored OTP and timestamp for the email from the database const result = await collection.findOne({ email }); if (!result || !result.otp) { @@ -115,15 +106,13 @@ otpRouter.post('/verify-otp', async (req, res) => { // Compare the provided OTP with the stored OTP if (otp === storedOTP) { - // Clear OTP from storage after successful verification (for demo purposes) await collection.deleteOne({ email }); - return res.json({ message: errorConstants.otpVerfied }); + const token = jwt.sign({ email }, process.env.ACCESS_TOKEN_SECRET, { expiresIn: '1h' }); + return res.json({ message: errorConstants.otpVerfied, token }); } - res.status(401).json({ error: errorConstants.incorrectOTP }); } catch (err) { - console.error('Error:', err.message); - res.status(500).json({ error: 'Internal Server Error' }); + res.status(500).json({ error: errorConstants.internalServerError }); } finally { await client.close(); } diff --git a/backend/yarn.lock b/backend/yarn.lock index 5b7ba31..bf6b431 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -4,43 +4,43 @@ "@mongodb-js/saslprep@^1.1.0": version "1.1.4" - resolved "https://registry.yarnpkg.com/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz#24ec1c4915a65f5c506bb88c081731450d91bb1c" + resolved "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz" integrity sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw== dependencies: sparse-bitfield "^3.0.3" "@types/babel-types@*", "@types/babel-types@^7.0.0": version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.15.tgz#11fb1ab5a4f984d00d1c80a768f6fb8d59f96966" + resolved "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.15.tgz" integrity sha512-JUgfZHUOMbtjopxiOQaaF+Uovk5wpDqpXR+XLWiOivCWSy1FccO30lvNNpCt8geFwq8VmGT2y9OMkOpA0g5O5g== "@types/babylon@^6.16.2": version "6.16.9" - resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.9.tgz#7abf03f6591a921fe3171af91433077cd2666e36" + resolved "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.9.tgz" integrity sha512-sEKyxMVEowhcr8WLfN0jJYe4gS4Z9KC2DGz0vqfC7+MXFbmvOF7jSjALC77thvAO2TLgFUPa9vDeOak+AcUrZA== dependencies: "@types/babel-types" "*" "@types/webidl-conversions@*": version "7.0.3" - resolved "https://registry.yarnpkg.com/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz#1306dbfa53768bcbcfc95a1c8cde367975581859" + resolved "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz" integrity sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA== "@types/whatwg-url@^11.0.2": version "11.0.4" - resolved "https://registry.yarnpkg.com/@types/whatwg-url/-/whatwg-url-11.0.4.tgz#ffed0dc8d89d91f62e3f368fcbda222a487c4f63" + resolved "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz" integrity sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw== dependencies: "@types/webidl-conversions" "*" abbrev@1: version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== accepts@~1.3.5: version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== dependencies: mime-types "~2.1.34" @@ -48,24 +48,24 @@ accepts@~1.3.5: acorn-globals@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz" integrity sha512-uWttZCk96+7itPxK8xCzY86PnxKTMrReKDqrHzv42VQY0K30PUO8WY13WMOuI+cOdX4EIdzdvQ8k6jkuGRFMYw== dependencies: acorn "^4.0.4" acorn@^3.1.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + resolved "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz" integrity sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw== acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + resolved "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz" integrity sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug== align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + resolved "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz" integrity sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg== dependencies: kind-of "^3.0.2" @@ -74,12 +74,12 @@ align-text@^0.1.1, align-text@^0.1.3: amdefine@>=0.0.4: version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + resolved "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== anymatch@~3.1.2: version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" @@ -87,22 +87,22 @@ anymatch@~3.1.2: append-field@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/append-field/-/append-field-1.0.0.tgz#1e3440e915f0b1203d23748e78edd7b9b5b43e56" + resolved "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz" integrity sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw== array-flatten@1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== asap@~2.0.3: version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== babel-runtime@^6.26.0: version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + resolved "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz" integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g== dependencies: core-js "^2.4.0" @@ -110,7 +110,7 @@ babel-runtime@^6.26.0: babel-types@^6.26.0: version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + resolved "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz" integrity sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g== dependencies: babel-runtime "^6.26.0" @@ -120,50 +120,34 @@ babel-types@^6.26.0: babylon@^6.18.0: version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + resolved "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz" integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== basic-auth@~2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" + resolved "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz" integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== dependencies: safe-buffer "5.1.2" bcryptjs@^2.4.3: version "2.4.3" - resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.3.tgz#9ab5627b93e60621ff7cdac5da9733027df1d0cb" + resolved "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz" integrity sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ== binary-extensions@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -body-parser@1.18.3: - version "1.18.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" - integrity sha512-YQyoqQG3sO8iCmf8+hyVpgHHOv0/hCEFiS4zTGUwTA1HjAFX66wRcNQrVCeJq9pgESMRvUAOvSil5MJlmccuKQ== - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "~1.6.3" - iconv-lite "0.4.23" - on-finished "~2.3.0" - qs "6.5.2" - raw-body "2.3.3" - type-is "~1.6.16" - body-parser@^1.20.2: version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz" integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== dependencies: bytes "3.1.2" @@ -179,9 +163,25 @@ body-parser@^1.20.2: type-is "~1.6.18" unpipe "1.0.0" +body-parser@1.18.3: + version "1.18.3" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz" + integrity sha512-YQyoqQG3sO8iCmf8+hyVpgHHOv0/hCEFiS4zTGUwTA1HjAFX66wRcNQrVCeJq9pgESMRvUAOvSil5MJlmccuKQ== + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "~1.6.3" + iconv-lite "0.4.23" + on-finished "~2.3.0" + qs "6.5.2" + raw-body "2.3.3" + type-is "~1.6.16" + brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -189,46 +189,46 @@ brace-expansion@^1.1.7: braces@~3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" bson@^6.2.0: version "6.2.0" - resolved "https://registry.yarnpkg.com/bson/-/bson-6.2.0.tgz#4b6acafc266ba18eeee111373c2699304a9ba0a3" + resolved "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz" integrity sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q== buffer-equal-constant-time@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== buffer-from@^1.0.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== busboy@^1.0.0: version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz" integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== dependencies: streamsearch "^1.1.0" bytes@3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz" integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== bytes@3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.5" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz" integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== dependencies: function-bind "^1.1.2" @@ -237,12 +237,12 @@ call-bind@^1.0.0, call-bind@^1.0.2: camelcase@^1.0.2: version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" integrity sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g== center-align@^0.1.1: version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + resolved "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz" integrity sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ== dependencies: align-text "^0.1.3" @@ -250,14 +250,14 @@ center-align@^0.1.1: character-parser@^2.1.1: version "2.2.0" - resolved "https://registry.yarnpkg.com/character-parser/-/character-parser-2.2.0.tgz#c7ce28f36d4bcd9744e5ffc2c5fcde1c73261fc0" + resolved "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz" integrity sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw== dependencies: is-regex "^1.0.3" chokidar@^3.5.2: version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: anymatch "~3.1.2" @@ -272,7 +272,7 @@ chokidar@^3.5.2: clean-css@^3.3.0: version "3.4.28" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.4.28.tgz#bf1945e82fc808f55695e6ddeaec01400efd03ff" + resolved "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz" integrity sha512-aTWyttSdI2mYi07kWqHi24NUU9YlELFKGOAgFzZjDN1064DMAOy2FBuoyGmkKRlXkbpXd0EVHmiVkbKhKoirTw== dependencies: commander "2.8.x" @@ -280,7 +280,7 @@ clean-css@^3.3.0: cliui@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + resolved "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz" integrity sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA== dependencies: center-align "^0.1.1" @@ -289,19 +289,19 @@ cliui@^2.1.0: commander@2.8.x: version "2.8.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + resolved "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz" integrity sha512-+pJLBFVk+9ZZdlAOB5WuIElVPPth47hILFkmGym57aq8kwxsowvByvB0DHs1vQAhyMZzdcpTtF0VDKGkSDR4ZQ== dependencies: graceful-readlink ">= 1.0.0" concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== concat-stream@^1.5.2: version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: buffer-from "^1.0.0" @@ -311,7 +311,7 @@ concat-stream@^1.5.2: constantinople@^3.0.1: version "3.1.2" - resolved "https://registry.yarnpkg.com/constantinople/-/constantinople-3.1.2.tgz#d45ed724f57d3d10500017a7d3a889c1381ae647" + resolved "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz" integrity sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw== dependencies: "@types/babel-types" "^7.0.0" @@ -321,17 +321,17 @@ constantinople@^3.0.1: content-disposition@0.5.2: version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz" integrity sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA== content-type@~1.0.4, content-type@~1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== cookie-parser@~1.4.4: version "1.4.6" - resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.6.tgz#3ac3a7d35a7a03bbc7e365073a26074824214594" + resolved "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz" integrity sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA== dependencies: cookie "0.4.1" @@ -339,122 +339,130 @@ cookie-parser@~1.4.4: cookie-signature@1.0.6: version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== cookie@0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz" integrity sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw== cookie@0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz" integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== core-js@^2.4.0: version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz" integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-util-is@~1.0.0: version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== +cors@^2.8.5: + version "2.8.5" + resolved "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== dependencies: - ms "2.0.0" + object-assign "^4" + vary "^1" -debug@4.x, debug@^4, debug@^4.3.4: +debug@^4, debug@^4.3.4, debug@4.x: version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" +debug@2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + decamelize@^1.0.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== define-data-property@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz" integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== dependencies: get-intrinsic "^1.2.1" gopd "^1.0.1" has-property-descriptors "^1.0.0" -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - depd@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== +depd@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== destroy@~1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + resolved "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" integrity sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg== +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + doctypes@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9" + resolved "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz" integrity sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ== dotenv@^16.3.2: version "16.4.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.1.tgz#1d9931f1d3e5d2959350d1250efab299561f7f11" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz" integrity sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ== ecdsa-sig-formatter@1.0.11: version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz" integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== dependencies: safe-buffer "^5.0.1" ee-first@1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== encodeurl@~1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== escape-html@~1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== etag@~1.8.1: version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== express@~4.16.1: version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" + resolved "https://registry.npmjs.org/express/-/express-4.16.4.tgz" integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== dependencies: accepts "~1.3.5" @@ -490,14 +498,14 @@ express@~4.16.1: fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" finalhandler@1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz" integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== dependencies: debug "2.6.9" @@ -510,27 +518,27 @@ finalhandler@1.1.1: forwarded@0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== fresh@0.5.2: version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== fsevents@~2.3.2: version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== get-intrinsic@^1.0.2, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: version "1.2.2" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz" integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== dependencies: function-bind "^1.1.2" @@ -540,62 +548,62 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@ glob-parent@~5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" gopd@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz" integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== dependencies: get-intrinsic "^1.1.3" "graceful-readlink@>= 1.0.0": version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + resolved "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" integrity sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w== has-flag@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz" integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== dependencies: get-intrinsic "^1.2.2" has-proto@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== has-tostringtag@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== dependencies: has-symbols "^1.0.2" hasown@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz" integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== dependencies: function-bind "^1.1.2" -http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: +http-errors@~1.6.2, http-errors@~1.6.3, http-errors@1.6.3: version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== dependencies: depd "~1.1.2" @@ -605,7 +613,7 @@ http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: http-errors@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: depd "2.0.0" @@ -616,60 +624,60 @@ http-errors@2.0.0: iconv-lite@0.4.23: version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz" integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== dependencies: safer-buffer ">= 2.1.2 < 3" iconv-lite@0.4.24: version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" ignore-by-default@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" + resolved "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz" integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== +inherits@^2.0.3, inherits@~2.0.3, inherits@2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + inherits@2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== -inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - ipaddr.js@1.9.1: version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== is-binary-path@~2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: binary-extensions "^2.0.0" is-buffer@^1.1.5: version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-core-module@^2.13.0: version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz" integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: hasown "^2.0.0" is-expression@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-expression/-/is-expression-3.0.0.tgz#39acaa6be7fd1f3471dc42c7416e61c24317ac9f" + resolved "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz" integrity sha512-vyMeQMq+AiH5uUnoBfMTwf18tO3bM6k1QXBE9D6ueAAquEfCZe3AJPtud9g6qS0+4X8xA7ndpZiDyeb2l2qOBw== dependencies: acorn "~4.0.2" @@ -677,29 +685,29 @@ is-expression@^3.0.0: is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-number@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-promise@^2.0.0: version "2.2.2" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + resolved "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== is-regex@^1.0.3: version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== dependencies: call-bind "^1.0.2" @@ -707,17 +715,17 @@ is-regex@^1.0.3: isarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== js-stringify@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/js-stringify/-/js-stringify-1.0.2.tgz#1736fddfd9724f28a3682adc6230ae7e4e9679db" + resolved "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz" integrity sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g== jsonwebtoken@^9.0.2: version "9.0.2" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz" integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== dependencies: jws "^3.2.2" @@ -733,7 +741,7 @@ jsonwebtoken@^9.0.2: jstransformer@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/jstransformer/-/jstransformer-1.0.0.tgz#ed8bf0921e2f3f1ed4d5c1a44f68709ed24722c3" + resolved "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz" integrity sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A== dependencies: is-promise "^2.0.0" @@ -741,7 +749,7 @@ jstransformer@1.0.0: jwa@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + resolved "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz" integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== dependencies: buffer-equal-constant-time "1.0.1" @@ -750,7 +758,7 @@ jwa@^1.4.1: jws@^3.2.2: version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + resolved "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz" integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== dependencies: jwa "^1.4.1" @@ -758,132 +766,132 @@ jws@^3.2.2: kareem@2.5.1: version "2.5.1" - resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.5.1.tgz#7b8203e11819a8e77a34b3517d3ead206764d15d" + resolved "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz" integrity sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA== kind-of@^3.0.2: version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== dependencies: is-buffer "^1.1.5" lazy-cache@^1.0.3: version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + resolved "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" integrity sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ== lodash.includes@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz" integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== lodash.isboolean@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz" integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== lodash.isinteger@^4.0.4: version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + resolved "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz" integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== lodash.isnumber@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + resolved "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz" integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== lodash.isplainobject@^4.0.6: version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== lodash.isstring@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== lodash.once@^4.0.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + resolved "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz" integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== lodash@^4.17.4: version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== longest@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + resolved "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" integrity sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg== lru-cache@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" media-typer@0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== memory-pager@^1.0.2: version "1.5.0" - resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" + resolved "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz" integrity sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg== merge-descriptors@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== methods@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== mime-db@1.52.0: version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" mime@1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + resolved "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz" integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== minimatch@^3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimist@^1.2.6: version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mkdirp@^0.5.4: version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" mongodb-connection-string-url@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz#b4f87f92fd8593f3b9365f592515a06d304a1e9c" + resolved "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz" integrity sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ== dependencies: "@types/whatwg-url" "^11.0.2" @@ -891,7 +899,7 @@ mongodb-connection-string-url@^3.0.0: mongodb@6.3.0: version "6.3.0" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-6.3.0.tgz#ec9993b19f7ed2ea715b903fcac6171c9d1d38ca" + resolved "https://registry.npmjs.org/mongodb/-/mongodb-6.3.0.tgz" integrity sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA== dependencies: "@mongodb-js/saslprep" "^1.1.0" @@ -900,7 +908,7 @@ mongodb@6.3.0: mongoose@^8.1.0: version "8.1.1" - resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-8.1.1.tgz#2ea2dcdcf4943196f585b3915f63001e79214e1b" + resolved "https://registry.npmjs.org/mongoose/-/mongoose-8.1.1.tgz" integrity sha512-DbLb0NsiEXmaqLOpEz+AtAsgwhRw6f25gwa1dF5R7jj6lS1D8X6uTdhBSC8GDVtOwe5Tfw2EL7nTn6hiJT3Bgg== dependencies: bson "^6.2.0" @@ -913,7 +921,7 @@ mongoose@^8.1.0: morgan@~1.9.1: version "1.9.1" - resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz#0a8d16734a1d9afbc824b99df87e738e58e2da59" + resolved "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz" integrity sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA== dependencies: basic-auth "~2.0.0" @@ -924,34 +932,39 @@ morgan@~1.9.1: mpath@0.9.0: version "0.9.0" - resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.9.0.tgz#0c122fe107846e31fc58c75b09c35514b3871904" + resolved "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz" integrity sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew== mquery@5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/mquery/-/mquery-5.0.0.tgz#a95be5dfc610b23862df34a47d3e5d60e110695d" + resolved "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz" integrity sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg== dependencies: debug "4.x" +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + ms@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== ms@2.1.2: version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1: +ms@2.1.3: version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== multer@^1.4.5-lts.1: version "1.4.5-lts.1" - resolved "https://registry.yarnpkg.com/multer/-/multer-1.4.5-lts.1.tgz#803e24ad1984f58edffbc79f56e305aec5cfd1ac" + resolved "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz" integrity sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ== dependencies: append-field "^1.0.0" @@ -964,17 +977,17 @@ multer@^1.4.5-lts.1: negotiator@0.6.3: version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== nodemailer@^6.9.8: version "6.9.8" - resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.9.8.tgz#29601e80440f2af7aa62b32758fdac7c6b784143" + resolved "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.8.tgz" integrity sha512-cfrYUk16e67Ks051i4CntM9kshRYei1/o/Gi8K1d+R34OIs21xdFnW7Pt7EucmVKA0LKtqUGNcjMZ7ehjl49mQ== nodemon@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.3.tgz#244a62d1c690eece3f6165c6cdb0db03ebd80b76" + resolved "https://registry.npmjs.org/nodemon/-/nodemon-3.0.3.tgz" integrity sha512-7jH/NXbFPxVaMwmBCC2B9F/V6X1VkEdNgx3iu9jji8WxWcvhMWkmhNWhI5077zknOnZnBzba9hZP6bCPJLSReQ== dependencies: chokidar "^3.5.2" @@ -990,80 +1003,80 @@ nodemon@^3.0.3: nopt@~1.0.10: version "1.0.10" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" + resolved "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz" integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== dependencies: abbrev "1" normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== object-inspect@^1.9.0: version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - on-finished@~2.3.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== dependencies: ee-first "1.1.1" +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + on-headers@~1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + resolved "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== parseurl@~1.3.2: version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@0.1.7: version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== process-nextick-args@~2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== promise@^7.0.1: version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + resolved "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz" integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== dependencies: asap "~2.0.3" proxy-addr@~2.0.4: version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz" integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== dependencies: forwarded "0.2.0" @@ -1071,12 +1084,12 @@ proxy-addr@~2.0.4: pstree.remy@^1.1.8: version "1.1.8" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" + resolved "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz" integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== pug-attrs@^2.0.2: version "2.0.4" - resolved "https://registry.yarnpkg.com/pug-attrs/-/pug-attrs-2.0.4.tgz#b2f44c439e4eb4ad5d4ef25cac20d18ad28cc336" + resolved "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.4.tgz" integrity sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ== dependencies: constantinople "^3.0.1" @@ -1085,7 +1098,7 @@ pug-attrs@^2.0.2: pug-code-gen@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/pug-code-gen/-/pug-code-gen-1.1.1.tgz#1cf72744ef2a039eae6a3340caaa1105871258e8" + resolved "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-1.1.1.tgz" integrity sha512-UwZaJVhjhy2kYntLqXjSV1ae+K96ve6bG+N5bLFfA6yyGJTEkguct19MWDyUM9D8CDU3NNxVctUAh5McF19E6w== dependencies: constantinople "^3.0.1" @@ -1099,12 +1112,12 @@ pug-code-gen@^1.1.1: pug-error@^1.3.2, pug-error@^1.3.3: version "1.3.3" - resolved "https://registry.yarnpkg.com/pug-error/-/pug-error-1.3.3.tgz#f342fb008752d58034c185de03602dd9ffe15fa6" + resolved "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz" integrity sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ== pug-filters@^2.1.1: version "2.1.5" - resolved "https://registry.yarnpkg.com/pug-filters/-/pug-filters-2.1.5.tgz#66bf6e80d97fbef829bab0aa35eddff33fc964f3" + resolved "https://registry.npmjs.org/pug-filters/-/pug-filters-2.1.5.tgz" integrity sha512-xkw71KtrC4sxleKiq+cUlQzsiLn8pM5+vCgkChW2E6oNOzaqTSIBKIQ5cl4oheuDzvJYCTSYzRaVinMUrV4YLQ== dependencies: clean-css "^3.3.0" @@ -1117,7 +1130,7 @@ pug-filters@^2.1.1: pug-lexer@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/pug-lexer/-/pug-lexer-3.1.0.tgz#fd087376d4a675b4f59f8fef422883434e9581a2" + resolved "https://registry.npmjs.org/pug-lexer/-/pug-lexer-3.1.0.tgz" integrity sha512-DxXOrmCIDVEwzN2ozZBK1t4QRTR6pLv5YkqM6dLdaSHnm+LJJRBngVn4IDMMBZQR9xUpxrRm9rffmku2OEqkJw== dependencies: character-parser "^2.1.1" @@ -1126,7 +1139,7 @@ pug-lexer@^3.0.0: pug-linker@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/pug-linker/-/pug-linker-2.0.3.tgz#b331ffa25737dde69c127b56c10ff17fae766dca" + resolved "https://registry.npmjs.org/pug-linker/-/pug-linker-2.0.3.tgz" integrity sha512-ZqKljvFUl1K5L4G5WABJ5FUYWOY0K2AXLmwj2QfM7nPCUcxfsmr05SikjgXGXVoIrygGzM/iWSsXwnkWId4AHw== dependencies: pug-error "^1.3.2" @@ -1134,7 +1147,7 @@ pug-linker@^2.0.2: pug-load@^2.0.5: version "2.0.12" - resolved "https://registry.yarnpkg.com/pug-load/-/pug-load-2.0.12.tgz#d38c85eb85f6e2f704dea14dcca94144d35d3e7b" + resolved "https://registry.npmjs.org/pug-load/-/pug-load-2.0.12.tgz" integrity sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg== dependencies: object-assign "^4.1.0" @@ -1142,7 +1155,7 @@ pug-load@^2.0.5: pug-parser@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/pug-parser/-/pug-parser-2.0.2.tgz#53a680cfd05039dcb0c27d029094bc4a792689b0" + resolved "https://registry.npmjs.org/pug-parser/-/pug-parser-2.0.2.tgz" integrity sha512-PW8kKDLN07MbFljR/GaYHPBGW+64YldtFFZUEGltJ67RRzebI/DxZy4njlxacy9JeheosyVprZ9C5DIexG1D/Q== dependencies: pug-error "^1.3.2" @@ -1150,24 +1163,24 @@ pug-parser@^2.0.2: pug-runtime@^2.0.3, pug-runtime@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/pug-runtime/-/pug-runtime-2.0.5.tgz#6da7976c36bf22f68e733c359240d8ae7a32953a" + resolved "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz" integrity sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw== pug-strip-comments@^1.0.2: version "1.0.4" - resolved "https://registry.yarnpkg.com/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz#cc1b6de1f6e8f5931cf02ec66cdffd3f50eaf8a8" + resolved "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz" integrity sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw== dependencies: pug-error "^1.3.3" pug-walk@^1.1.2, pug-walk@^1.1.5, pug-walk@^1.1.8: version "1.1.8" - resolved "https://registry.yarnpkg.com/pug-walk/-/pug-walk-1.1.8.tgz#b408f67f27912f8c21da2f45b7230c4bd2a5ea7a" + resolved "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz" integrity sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA== pug@2.0.0-beta11: version "2.0.0-beta11" - resolved "https://registry.yarnpkg.com/pug/-/pug-2.0.0-beta11.tgz#15abe6af5004c7e2cf4613e4b27465c9546b5f01" + resolved "https://registry.npmjs.org/pug/-/pug-2.0.0-beta11.tgz" integrity sha512-iV0ibDCWLJGw8eEtBKAqbJZecOabQa6hpFeH+GCBzsAsCNSvpjo4wuHMPcmqtaZhxoO3ElbMePf8jkrM9TKulw== dependencies: pug-code-gen "^1.1.1" @@ -1181,29 +1194,29 @@ pug@2.0.0-beta11: punycode@^2.3.0: version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== qs@6.11.0: version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz" integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== dependencies: side-channel "^1.0.4" qs@6.5.2: version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + resolved "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== range-parser@~1.2.0: version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== raw-body@2.3.3: version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz" integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== dependencies: bytes "3.0.0" @@ -1213,7 +1226,7 @@ raw-body@2.3.3: raw-body@2.5.2: version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz" integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== dependencies: bytes "3.1.2" @@ -1223,7 +1236,7 @@ raw-body@2.5.2: readable-stream@^2.2.2: version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== dependencies: core-util-is "~1.0.0" @@ -1236,24 +1249,24 @@ readable-stream@^2.2.2: readdirp@~3.6.0: version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" regenerator-runtime@^0.11.0: version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz" integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== repeat-string@^1.5.2: version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== resolve@^1.1.6: version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: is-core-module "^2.13.0" @@ -1262,36 +1275,36 @@ resolve@^1.1.6: right-align@^0.1.1: version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + resolved "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz" integrity sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg== dependencies: align-text "^0.1.1" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - safe-buffer@^5.0.1: version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + "safer-buffer@>= 2.1.2 < 3": version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== semver@^7.5.3, semver@^7.5.4: version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" send@0.16.2: version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + resolved "https://registry.npmjs.org/send/-/send-0.16.2.tgz" integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== dependencies: debug "2.6.9" @@ -1310,7 +1323,7 @@ send@0.16.2: serve-static@1.13.2: version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz" integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== dependencies: encodeurl "~1.0.2" @@ -1320,7 +1333,7 @@ serve-static@1.13.2: set-function-length@^1.1.1: version "1.2.0" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.0.tgz#2f81dc6c16c7059bda5ab7c82c11f03a515ed8e1" + resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz" integrity sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w== dependencies: define-data-property "^1.1.1" @@ -1331,17 +1344,17 @@ set-function-length@^1.1.1: setprototypeof@1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz" integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== setprototypeof@1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== side-channel@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== dependencies: call-bind "^1.0.0" @@ -1350,113 +1363,113 @@ side-channel@^1.0.4: sift@16.0.1: version "16.0.1" - resolved "https://registry.yarnpkg.com/sift/-/sift-16.0.1.tgz#e9c2ccc72191585008cf3e36fc447b2d2633a053" + resolved "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz" integrity sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ== simple-update-notifier@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb" + resolved "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz" integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w== dependencies: semver "^7.5.3" +source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== + source-map@0.4.x: version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz" integrity sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A== dependencies: amdefine ">=0.0.4" -source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== - sparse-bitfield@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11" + resolved "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz" integrity sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ== dependencies: memory-pager "^1.0.2" -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - "statuses@>= 1.4.0 < 2": version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== statuses@~1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz" integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + streamsearch@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== string_decoder@~1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" supports-color@^5.5.0: version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== to-fast-properties@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz" integrity sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og== to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" toidentifier@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== token-stream@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/token-stream/-/token-stream-0.0.1.tgz#ceeefc717a76c4316f126d0b9dbaa55d7e7df01a" + resolved "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz" integrity sha512-nfjOAu/zAWmX9tgwi5NRp7O7zTDUD1miHiB40klUnAh9qnL1iXdgzcz/i5dMaL5jahcBAaSfmNOBBJBLJW8TEg== touch@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" + resolved "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz" integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== dependencies: nopt "~1.0.10" tr46@^4.1.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-4.1.1.tgz#281a758dcc82aeb4fe38c7dfe4d11a395aac8469" + resolved "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz" integrity sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw== dependencies: punycode "^2.3.0" type-is@^1.6.4, type-is@~1.6.16, type-is@~1.6.18: version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== dependencies: media-typer "0.3.0" @@ -1464,12 +1477,12 @@ type-is@^1.6.4, type-is@~1.6.16, type-is@~1.6.18: typedarray@^0.0.6: version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== uglify-js@^2.6.1: version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz" integrity sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w== dependencies: source-map "~0.5.1" @@ -1479,47 +1492,47 @@ uglify-js@^2.6.1: uglify-to-browserify@~1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + resolved "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz" integrity sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q== undefsafe@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" + resolved "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz" integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@~1.0.0, unpipe@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== util-deprecate@~1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== utils-merge@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== -vary@~1.1.2: +vary@^1, vary@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== void-elements@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + resolved "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz" integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== webidl-conversions@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== whatwg-url@^13.0.0: version "13.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-13.0.0.tgz#b7b536aca48306394a34e44bda8e99f332410f8f" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz" integrity sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig== dependencies: tr46 "^4.1.1" @@ -1527,12 +1540,12 @@ whatwg-url@^13.0.0: window-size@0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + resolved "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" integrity sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg== with@^5.0.0: version "5.1.1" - resolved "https://registry.yarnpkg.com/with/-/with-5.1.1.tgz#fa4daa92daf32c4ea94ed453c81f04686b575dfe" + resolved "https://registry.npmjs.org/with/-/with-5.1.1.tgz" integrity sha512-uAnSsFGfSpF6DNhBXStvlZILfHJfJu4eUkfbRGk94kGO1Ta7bg6FwfvoOhhyHAJuFbCw+0xk4uJ3u57jLvlCJg== dependencies: acorn "^3.1.0" @@ -1540,25 +1553,35 @@ with@^5.0.0: wordwrap@0.0.2: version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" integrity sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q== +xoauth2@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/xoauth2/-/xoauth2-1.2.0.tgz" + integrity sha512-hKuNbkj3q/ifCcfWnW6KURP+6ExSuLdLG007gasNhMEMKlLaejNkIA6eu5Ol1xPP0/kzTuA87XHDaAcUw5k73Q== + xtend@^4.0.0: version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== yallist@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yargs@~3.10.0: version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + resolved "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz" integrity sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A== dependencies: camelcase "^1.0.2" cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0" + +yarn@^1.22.21: + version "1.22.21" + resolved "https://registry.npmjs.org/yarn/-/yarn-1.22.21.tgz" + integrity sha512-ynXaJsADJ9JiZ84zU25XkPGOvVMmZ5b7tmTSpKURYwgELdjucAOydqIOrOfTxVYcNXe91xvLZwcRh68SR3liCg== diff --git a/frontend/ios/Flutter/Debug.xcconfig b/frontend/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/frontend/ios/Flutter/Debug.xcconfig +++ b/frontend/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/frontend/ios/Flutter/Release.xcconfig b/frontend/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/frontend/ios/Flutter/Release.xcconfig +++ b/frontend/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/frontend/lib/components/choice_selector.dart b/frontend/lib/components/choice_selector.dart index 1d730cf..737322b 100644 --- a/frontend/lib/components/choice_selector.dart +++ b/frontend/lib/components/choice_selector.dart @@ -2,8 +2,12 @@ import 'package:flutter/material.dart'; import 'package:search_choices/search_choices.dart'; class ChoiceSelector extends StatelessWidget { - - const ChoiceSelector({super.key, required this.onChanged, required this.value,required this.items, required this.hint}); + const ChoiceSelector( + {super.key, + required this.onChanged, + required this.value, + required this.items, + required this.hint}); final Function onChanged; final List> items; @@ -12,7 +16,7 @@ class ChoiceSelector extends StatelessWidget { @override Widget build(BuildContext context) { - return Theme( + return Theme( data: Theme.of(context).copyWith( highlightColor: Colors.transparent, splashColor: Colors.transparent, @@ -39,7 +43,8 @@ class ChoiceSelector extends StatelessWidget { fontSize: 15, fontFamily: "RobotoFlex", ), - contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + contentPadding: + const EdgeInsets.symmetric(horizontal: 20, vertical: 10), isDense: true, filled: true, fillColor: Colors.tealAccent.withOpacity(0.4), @@ -52,7 +57,7 @@ class ChoiceSelector extends StatelessWidget { ); }, menuConstraints: BoxConstraints.tight(const Size.fromHeight(350)), - validator:null, + validator: null, menuBackgroundColor: Colors.tealAccent.shade100, ), ); diff --git a/frontend/lib/components/snackbar.dart b/frontend/lib/components/snackbar.dart new file mode 100644 index 0000000..80b937e --- /dev/null +++ b/frontend/lib/components/snackbar.dart @@ -0,0 +1,9 @@ +import 'package:flutter/material.dart'; + +void showSnackBar(BuildContext context, String text) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(text), + ), + ); +} diff --git a/frontend/lib/constants/constants.dart b/frontend/lib/constants/constants.dart index 5077fb0..8e5bda7 100644 --- a/frontend/lib/constants/constants.dart +++ b/frontend/lib/constants/constants.dart @@ -1,3 +1,4 @@ +import 'package:email_validator/email_validator.dart'; import 'package:flutter/material.dart'; class AppConstants { @@ -7,8 +8,7 @@ class AppConstants { class Branches { static List> branchList = const [ - DropdownMenuItem( - value: "Computer Science and Engineering", child: Text("Computer Science and Engineering")), + DropdownMenuItem(value: "Computer Science and Engineering", child: Text("Computer Science and Engineering")), DropdownMenuItem(value: "Computer Science", child: Text("Computer Science")), DropdownMenuItem(value: "Electrical Engineering", child: Text("Electrical Engineering")), DropdownMenuItem(value: "Mechanical Engineering", child: Text("Mechanical Engineering")), @@ -107,21 +107,22 @@ class MessMenuConstants { ]; static final List mealTypes = [ - Text('Breakfast', style: TextStyle(color: Colors.teal.shade900, fontSize: 14)), - Text('Lunch', style: TextStyle(color: Colors.teal.shade900, fontSize: 14)), - Text('Snacks', style: TextStyle(color: Colors.teal.shade900, fontSize: 14)), - Text('Dinner', style: TextStyle(color: Colors.teal.shade900, fontSize: 14)), + Text('Breakfast',style: TextStyle(color: Colors.teal.shade900, fontSize: 14)), + Text('Lunch',style: TextStyle(color: Colors.teal.shade900, fontSize: 14)), + Text('Snacks',style: TextStyle(color: Colors.teal.shade900, fontSize: 14)), + Text('Dinner',style: TextStyle(color: Colors.teal.shade900, fontSize: 14)), ]; - static const Map weekdaysShortToLong = { - "Sun": "Sunday", - "Mon": "Monday", - "Tue": "Tuesday", - "Wed": "Wednesday", - "Thu": "Thursday", - "Fri": "Friday", - "Sat": "Saturday", + static const Map weekdaysShortToLong = { + "Sun":"Sunday", + "Mon":"Monday", + "Tue":"Tuesday", + "Wed":"Wednesday", + "Thu":"Thursday", + "Fri":"Friday", + "Sat":"Saturday", }; + } class Validators { @@ -129,7 +130,7 @@ class Validators { if (value == null || value.isEmpty) { return "Email cannot be empty"; } - if (!RegExp(r"^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$").hasMatch(value)) { + if (!EmailValidator.validate(value)) { return "Invalid email"; } return null; diff --git a/frontend/lib/constants/dummy_entries.dart b/frontend/lib/constants/dummy_entries.dart index 3f3079e..1b8239a 100644 --- a/frontend/lib/constants/dummy_entries.dart +++ b/frontend/lib/constants/dummy_entries.dart @@ -7,165 +7,70 @@ import '../models/student.dart'; class DummyStudents { static List students = [ Student( - id: '1', - collegeId: 'C001', - name: 'John Doe', - studentMail: 'john.doe@example.com', - rollNumber: '12345', - branch: 'Computer Science', - role: 'Student'), - Student( - id: '2', - collegeId: 'C002', - name: 'Alice Johnson', - studentMail: 'alice.johnson@example.com', - rollNumber: '67890', - branch: 'Mechanical Engineering', - role: 'Student'), - Student( - id: '3', - collegeId: 'C003', - name: 'Bob Williams', - studentMail: 'bob.williams@example.com', - rollNumber: '54321', - branch: 'Electrical Engineering', - role: 'Student'), - Student( - id: '4', - collegeId: 'C004', - name: 'Eva Davis', - studentMail: 'eva.davis@example.com', - rollNumber: '98765', - branch: 'Civil Engineering', - role: 'Student'), - Student( - id: '5', - collegeId: 'C005', - name: 'Chris Taylor', - studentMail: 'chris.taylor@example.com', - rollNumber: '13579', - branch: 'Chemical Engineering', - role: 'Student'), - Student( - id: '6', - collegeId: 'C006', - name: 'Grace Miller', - studentMail: 'grace.miller@example.com', - rollNumber: '24680', - branch: 'Biotechnology', - role: 'Student'), - Student( - id: '7', - collegeId: 'C007', - name: 'Daniel Brown', - studentMail: 'daniel.brown@example.com', - rollNumber: '97531', - branch: 'Aerospace Engineering', - role: 'Student'), - Student( - id: '8', - collegeId: 'C008', - name: 'Sophia Wilson', - studentMail: 'sophia.wilson@example.com', - rollNumber: '86420', - branch: 'Information Technology', - role: 'Student'), - Student( - id: '9', - collegeId: 'C009', - name: 'Matthew White', - studentMail: 'matthew.white@example.com', - rollNumber: '12340', - branch: 'Mechatronics', - role: 'Student'), - Student( - id: '10', - collegeId: 'C010', - name: 'Olivia Harris', - studentMail: 'olivia.harris@example.com', - rollNumber: '56789', - branch: 'Robotics Engineering', - role: 'Student'), - Student( - id: '11', - collegeId: 'C011', - name: 'William Turner', - studentMail: 'william.turner@example.com', - rollNumber: '34567', - branch: 'Industrial Engineering', - role: 'Student'), - Student( - id: '12', - collegeId: 'C012', - name: 'Emma Clark', - studentMail: 'emma.clark@example.com', - rollNumber: '89012', - branch: 'Computer Engineering', - role: 'Student'), - Student( - id: '13', - collegeId: 'C013', - name: 'Ryan Allen', - studentMail: 'ryan.allen@example.com', - rollNumber: '67890', - branch: 'Software Engineering', - role: 'Student'), - Student( - id: '14', - collegeId: 'C014', - name: 'Ava Young', - studentMail: 'ava.young@example.com', - rollNumber: '23456', - branch: 'Environmental Engineering', - role: 'Student'), - Student( - id: '15', - collegeId: 'C015', - name: 'Jackson Walker', - studentMail: 'jackson.walker@example.com', - rollNumber: '87654', - branch: 'Petroleum Engineering', - role: 'Student'), - Student( - id: '16', - collegeId: 'C016', - name: 'Sophie Lee', - studentMail: 'sophie.lee@example.com', - rollNumber: '54321', - branch: 'Nuclear Engineering', - role: 'Student'), + id: '1', + name: 'John Doe', + email: 'john.doe@example.com', + rollNumber: 'R001', + about: 'I am a computer science student.', + profilePicURI: 'https://example.com/john.jpg', + branch: 'Computer Science', + graduationYear: 2023, + skills: [], + achievements: [], + roles: ['role1', 'role2'], + ), Student( - id: '17', - collegeId: 'C017', - name: 'David Hall', - studentMail: 'david.hall@example.com', - rollNumber: '10987', - branch: 'Biomedical Engineering', - role: 'Student'), + id: '2', + name: 'John Doe', + email: 'john.doe@example.com', + rollNumber: 'R001', + about: 'I am a computer science student.', + profilePicURI: 'https://example.com/john.jpg', + branch: 'Computer Science', + graduationYear: 2023, + skills: [], + achievements: [], + roles: ['role1', 'role2'], + ), Student( - id: '18', - collegeId: 'C018', - name: 'Isabella Miller', - studentMail: 'isabella.miller@example.com', - rollNumber: '87654', - branch: 'Chemical Engineering', - role: 'Student'), + id: '3', + name: 'John Doe', + email: 'john.doe@example.com', + rollNumber: 'R001', + about: 'I am a computer science student.', + profilePicURI: 'https://example.com/john.jpg', + branch: 'Computer Science', + graduationYear: 2023, + skills: [], + achievements: [], + roles: ['role1', 'role2'], + ), Student( - id: '19', - collegeId: 'C019', - name: 'Mason Baker', - studentMail: 'mason.baker@example.com', - rollNumber: '54321', - branch: 'Electronics Engineering', - role: 'Student'), + id: '4', + name: 'John Doe', + email: 'john.doe@example.com', + rollNumber: 'R001', + about: 'I am a computer science student.', + profilePicURI: 'https://example.com/john.jpg', + branch: 'Computer Science', + graduationYear: 2023, + skills: [], + achievements: [], + roles: ['role1', 'role2'], + ), Student( - id: '20', - collegeId: 'C020', - name: 'Ella Turner', - studentMail: 'ella.turner@example.com', - rollNumber: '98765', - branch: 'Computer Science', - role: 'Student'), + id: '5', + name: 'John Doe', + email: 'john.doe@example.com', + rollNumber: 'R001', + about: 'I am a computer science student.', + profilePicURI: 'https://example.com/john.jpg', + branch: 'Computer Science', + graduationYear: 2023, + skills: [], + achievements: [], + roles: ['role1', 'role2'], + ), ]; } @@ -173,244 +78,245 @@ class DummyCourses { static List courses = [ Course( id: '1', - collegeId: 'C001', courseCode: 'CS101', courseName: 'Introduction to Computer Science', - branch: 'Computer Science'), + branches: ['Computer Science']), Course( id: '2', - collegeId: 'C002', courseCode: 'ME102', courseName: 'Mechanical Engineering Basics', - branch: 'Mechanical Engineering'), + branches: ['Mechanical Engineering']), Course( id: '3', - collegeId: 'C003', courseCode: 'EE103', courseName: 'Electrical Engineering Fundamentals', - branch: 'Electrical Engineering'), + branches: ['Electrical Engineering']), Course( id: '4', - collegeId: 'C004', - courseCode: 'CE104', + courseCode: 'EE104', courseName: 'Civil Engineering Principles', - branch: 'Civil Engineering'), + branches: ['Civil Engineering']), Course( id: '5', - collegeId: 'C005', courseCode: 'CHE105', courseName: 'Chemical Engineering Basics', - branch: 'Chemical Engineering'), + branches: ['Chemical Engineering']), Course( id: '6', - collegeId: 'C006', courseCode: 'BT106', courseName: 'Biotechnology Fundamentals', - branch: 'Biotechnology'), + branches: ['Biotechnology']), Course( id: '7', - collegeId: 'C007', courseCode: 'AE107', courseName: 'Aerospace Engineering Introduction', - branch: 'Aerospace Engineering'), + branches: ['Aerospace Engineering']), Course( id: '8', - collegeId: 'C008', courseCode: 'IT108', courseName: 'Information Technology Essentials', - branch: 'Information Technology'), - Course(id: '9', collegeId: 'C009', courseCode: 'MT109', courseName: 'Mechatronics Basics', branch: 'Mechatronics'), + branches: ['Information Technology']), + Course( + id: '9', + courseCode: 'MT109', + courseName: 'Mechatronics Basics', + branches: ['Mechatronics']), Course( id: '10', - collegeId: 'C010', courseCode: 'RE110', courseName: 'Robotics Engineering Fundamentals', - branch: 'Robotics Engineering'), + branches: ['Robotics Engineering']), Course( id: '11', - collegeId: 'C011', courseCode: 'IE111', courseName: 'Industrial Engineering Principles', - branch: 'Industrial Engineering'), + branches: ['Industrial Engineering']), Course( id: '12', - collegeId: 'C012', courseCode: 'CE112', courseName: 'Computer Engineering Basics', - branch: 'Computer Engineering'), + branches: ['Computer Engineering']), Course( id: '13', - collegeId: 'C013', courseCode: 'SE113', courseName: 'Software Engineering Fundamentals', - branch: 'Software Engineering'), + branches: ['Software Engineering']), Course( id: '14', - collegeId: 'C014', courseCode: 'EN114', courseName: 'Environmental Engineering Basics', - branch: 'Environmental Engineering'), + branches: ['Environmental Engineering']), Course( id: '15', - collegeId: 'C015', courseCode: 'PE115', courseName: 'Petroleum Engineering Introduction', - branch: 'Petroleum Engineering'), + branches: ['Petroleum Engineering']), Course( id: '16', - collegeId: 'C016', courseCode: 'NE116', courseName: 'Nuclear Engineering Basics', - branch: 'Nuclear Engineering'), + branches: ['Nuclear Engineering']), Course( id: '17', - collegeId: 'C017', courseCode: 'BE117', courseName: 'Biomedical Engineering Fundamentals', - branch: 'Biomedical Engineering'), + branches: ['Biomedical Engineering']), Course( id: '18', - collegeId: 'C018', courseCode: 'CE118', courseName: 'Chemical Engineering Principles', - branch: 'Chemical Engineering'), + branches: ['Chemical Engineering']), Course( id: '19', - collegeId: 'C019', courseCode: 'EE119', courseName: 'Electronics Engineering Basics', - branch: 'Electronics Engineering'), + branches: ['Electronics Engineering']), Course( id: '20', - collegeId: 'C020', courseCode: 'CS120', courseName: 'Advanced Computer Science Topics', - branch: 'Computer Science'), + branches: ['Computer Science']), ]; } class DummyFaculties { static List faculties = [ - Faculty( - id: '1', - collegeId: 'C001', - name: 'Dr. Smith', - facultyMail: 'smith@example.com', - courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]]), + Faculty(id: '1', name: 'Dr. Smith', email: 'smith@example.com', courses: [ + DummyCourses.courses[0], + DummyCourses.courses[5], + DummyCourses.courses[10], + ]), Faculty( id: '2', - collegeId: 'C002', name: 'Prof. Johnson', - facultyMail: 'johnson@example.com', - courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]]), - Faculty( - id: '3', - collegeId: 'C003', - name: 'Dr. Brown', - facultyMail: 'brown@example.com', - courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]]), - Faculty( - id: '4', - collegeId: 'C004', - name: 'Prof. Davis', - facultyMail: 'davis@example.com', - courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]]), - Faculty( - id: '5', - collegeId: 'C005', - name: 'Dr. Wilson', - facultyMail: 'wilson@example.com', - courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]]), + email: 'johnson@example.com', + courses: [ + DummyCourses.courses[1], + DummyCourses.courses[6], + DummyCourses.courses[11] + ]), + Faculty(id: '3', name: 'Dr. Brown', email: 'brown@example.com', courses: [ + DummyCourses.courses[2], + DummyCourses.courses[7], + DummyCourses.courses[12] + ]), + Faculty(id: '4', name: 'Prof. Davis', email: 'davis@example.com', courses: [ + DummyCourses.courses[3], + DummyCourses.courses[8], + DummyCourses.courses[13] + ]), + Faculty(id: '5', name: 'Dr. Wilson', email: 'wilson@example.com', courses: [ + DummyCourses.courses[4], + DummyCourses.courses[9], + DummyCourses.courses[14] + ]), Faculty( id: '6', - collegeId: 'C006', name: 'Prof. Miller', - facultyMail: 'miller@example.com', - courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]]), - Faculty( - id: '7', - collegeId: 'C007', - name: 'Dr. Turner', - facultyMail: 'turner@example.com', - courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]]), - Faculty( - id: '8', - collegeId: 'C008', - name: 'Prof. Clark', - facultyMail: 'clark@example.com', - courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]]), - Faculty( - id: '9', - collegeId: 'C009', - name: 'Dr. Harris', - facultyMail: 'harris@example.com', - courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]]), + email: 'miller@example.com', + courses: [ + DummyCourses.courses[0], + DummyCourses.courses[5], + DummyCourses.courses[10] + ]), + Faculty(id: '7', name: 'Dr. Turner', email: 'turner@example.com', courses: [ + DummyCourses.courses[1], + DummyCourses.courses[6], + DummyCourses.courses[11] + ]), + Faculty(id: '8', name: 'Prof. Clark', email: 'clark@example.com', courses: [ + DummyCourses.courses[2], + DummyCourses.courses[7], + DummyCourses.courses[12] + ]), + Faculty(id: '9', name: 'Dr. Harris', email: 'harris@example.com', courses: [ + DummyCourses.courses[3], + DummyCourses.courses[8], + DummyCourses.courses[13] + ]), Faculty( id: '10', - collegeId: 'C010', name: 'Prof. Turner', - facultyMail: 'turner@example.com', - courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]]), - Faculty( - id: '11', - collegeId: 'C011', - name: 'Dr. White', - facultyMail: 'white@example.com', - courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]]), + email: 'turner@example.com', + courses: [ + DummyCourses.courses[4], + DummyCourses.courses[9], + DummyCourses.courses[14] + ]), + Faculty(id: '11', name: 'Dr. White', email: 'white@example.com', courses: [ + DummyCourses.courses[0], + DummyCourses.courses[5], + DummyCourses.courses[10] + ]), Faculty( id: '12', - collegeId: 'C012', name: 'Prof. Allen', - facultyMail: 'allen@example.com', - courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]]), - Faculty( - id: '13', - collegeId: 'C013', - name: 'Dr. Young', - facultyMail: 'young@example.com', - courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]]), + email: 'allen@example.com', + courses: [ + DummyCourses.courses[1], + DummyCourses.courses[6], + DummyCourses.courses[11] + ]), + Faculty(id: '13', name: 'Dr. Young', email: 'young@example.com', courses: [ + DummyCourses.courses[2], + DummyCourses.courses[7], + DummyCourses.courses[12] + ]), Faculty( id: '14', - collegeId: 'C014', name: 'Prof. Walker', - facultyMail: 'walker@example.com', - courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]]), - Faculty( - id: '15', - collegeId: 'C015', - name: 'Dr. Lee', - facultyMail: 'lee@example.com', - courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]]), - Faculty( - id: '16', - collegeId: 'C016', - name: 'Prof. Hall', - facultyMail: 'hall@example.com', - courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]]), + email: 'walker@example.com', + courses: [ + DummyCourses.courses[3], + DummyCourses.courses[8], + DummyCourses.courses[13] + ]), + Faculty(id: '15', name: 'Dr. Lee', email: 'lee@example.com', courses: [ + DummyCourses.courses[4], + DummyCourses.courses[9], + DummyCourses.courses[14] + ]), + Faculty(id: '16', name: 'Prof. Hall', email: 'hall@example.com', courses: [ + DummyCourses.courses[0], + DummyCourses.courses[5], + DummyCourses.courses[10] + ]), Faculty( id: '17', - collegeId: 'C017', name: 'Dr. Miller', - facultyMail: 'miller@example.com', - courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]]), + email: 'miller@example.com', + courses: [ + DummyCourses.courses[1], + DummyCourses.courses[6], + DummyCourses.courses[11] + ]), Faculty( id: '18', - collegeId: 'C018', name: 'Prof. Baker', - facultyMail: 'baker@example.com', - courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]]), + email: 'baker@example.com', + courses: [ + DummyCourses.courses[2], + DummyCourses.courses[7], + DummyCourses.courses[12] + ]), Faculty( id: '19', - collegeId: 'C019', name: 'Dr. Turner', - facultyMail: 'turner@example.com', - courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]]), + email: 'turner@example.com', + courses: [ + DummyCourses.courses[3], + DummyCourses.courses[8], + DummyCourses.courses[13] + ]), Faculty( id: '20', - collegeId: 'C020', name: 'Prof. Smith', - facultyMail: 'smith@example.com', - courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]]), + email: 'smith@example.com', + courses: [ + DummyCourses.courses[4], + DummyCourses.courses[9], + DummyCourses.courses[14] + ]), ]; } @@ -679,7 +585,11 @@ class DummyRooms { Room(id: '16', name: 'Outdoor Sports Arena', vacant: true), Room(id: '17', name: 'Medical Clinic', vacant: false, occupantId: 'S004'), Room(id: '18', name: 'Music Room', vacant: true), - Room(id: '19', name: 'Student Council Office', vacant: false, occupantId: 'T005'), + Room( + id: '19', + name: 'Student Council Office', + vacant: false, + occupantId: 'T005'), Room(id: '20', name: 'Virtual Reality Lab', vacant: true), ]; } diff --git a/frontend/lib/constants/error_handling.dart b/frontend/lib/constants/error_handling.dart new file mode 100644 index 0000000..80147d5 --- /dev/null +++ b/frontend/lib/constants/error_handling.dart @@ -0,0 +1,26 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; + +import '../components/snackbar.dart'; + +void httpErrorHandle({ + required http.Response response, + required BuildContext context, + required VoidCallback onSuccess, +}) { + switch (response.statusCode) { + case 200: + onSuccess(); + break; + case 400: + showSnackBar(context, jsonDecode(response.body)['msg']); + break; + case 500: + showSnackBar(context, jsonDecode(response.body)['error']); + break; + default: + showSnackBar(context, response.body); + } +} diff --git a/frontend/lib/models/achievement.dart b/frontend/lib/models/achievement.dart new file mode 100644 index 0000000..182b5a1 --- /dev/null +++ b/frontend/lib/models/achievement.dart @@ -0,0 +1,31 @@ +class Achievement { + final String id; + final String name; + final DateTime date; + final String description; + + Achievement({ + required this.id, + required this.name, + required this.date, + required this.description, + }); + + factory Achievement.fromJson(Map json) { + return Achievement( + id: json['_id'], + name: json['name'], + date: DateTime.parse(json['date']), + description: json['description'], + ); + } + + Map toJson() { + return { + '_id': id, + 'name': name, + 'date': date.toIso8601String(), + 'description': description, + }; + } +} diff --git a/frontend/lib/models/admin.dart b/frontend/lib/models/admin.dart new file mode 100644 index 0000000..25ce7d4 --- /dev/null +++ b/frontend/lib/models/admin.dart @@ -0,0 +1,27 @@ +class Admin { + final String id; + final String name; + final String email; + + Admin({ + required this.id, + required this.name, + required this.email, + }); + + factory Admin.fromJson(Map json) { + return Admin( + id: json['_id'], + name: json['name'] ?? 'Smart Insti User', + email: json['email'], + ); + } + + Map toJson() { + return { + '_id': id, + 'name': name, + 'email': email, + }; + } +} diff --git a/frontend/lib/models/course.dart b/frontend/lib/models/course.dart index 9b1d924..168e332 100644 --- a/frontend/lib/models/course.dart +++ b/frontend/lib/models/course.dart @@ -1,9 +1,32 @@ class Course { - Course({this.id, this.collegeId, required this.courseCode, required this.courseName, required this.branch}); - - final String? id; - final String? collegeId; + final String id; final String courseCode; final String courseName; - final String branch; -} \ No newline at end of file + final List branches; + + Course({ + required this.id, + required this.courseCode, + required this.courseName, + required this.branches, + }); + + factory Course.fromJson(Map json) { + return Course( + id: json['_id'], + courseCode: json['courseCode'], + courseName: json['name'], + branches: + (json['branches'] as List).map((item) => item as String).toList(), + ); + } + + Map toJson() { + return { + '_id': id, + 'courseCode': courseCode, + 'name': courseName, + 'branches': branches, + }; + } +} diff --git a/frontend/lib/models/faculty.dart b/frontend/lib/models/faculty.dart index 9414836..7ac985a 100644 --- a/frontend/lib/models/faculty.dart +++ b/frontend/lib/models/faculty.dart @@ -1,11 +1,35 @@ -import 'course.dart'; +import 'package:smart_insti_app/models/course.dart'; class Faculty { - Faculty({this.id, this.collegeId, required this.name, required this.facultyMail, required this.courses}); - - final String? id; - final String? collegeId; + final String id; final String name; - final String facultyMail; + final String email; final List courses; -} \ No newline at end of file + + Faculty({ + required this.id, + required this.name, + required this.email, + required this.courses, + }); + + factory Faculty.fromJson(Map json) { + return Faculty( + id: json['_id'], + name: json['name'] ?? 'Smart Insti User', + email: json['email'], + courses: (json['courses'] as List) + .map((item) => Course.fromJson(item)) + .toList(), + ); + } + + Map toJson() { + return { + '_id': id, + 'name': name, + 'email': email, + 'courses': courses, + }; + } +} diff --git a/frontend/lib/models/skills.dart b/frontend/lib/models/skills.dart new file mode 100644 index 0000000..7ee7a82 --- /dev/null +++ b/frontend/lib/models/skills.dart @@ -0,0 +1,27 @@ +class Skill { + final String id; + final String name; + final int level; + + Skill({ + required this.id, + required this.name, + required this.level, + }); + + factory Skill.fromJson(Map json) { + return Skill( + id: json['_id'], + name: json['name'], + level: json['level'], + ); + } + + Map toJson() { + return { + '_id': id, + 'name': name, + 'level': level, + }; + } +} diff --git a/frontend/lib/models/student.dart b/frontend/lib/models/student.dart index a388e30..46af59c 100644 --- a/frontend/lib/models/student.dart +++ b/frontend/lib/models/student.dart @@ -1,18 +1,67 @@ -class Student { - Student( - {required this.name, - required this.studentMail, - required this.rollNumber, - required this.branch, - required this.role, - this.id, - this.collegeId}); +import 'package:smart_insti_app/models/achievement.dart'; +import 'package:smart_insti_app/models/skills.dart'; - final String? id; - final String? collegeId; +class Student { + final String id; final String name; - final String studentMail; - final String rollNumber; - final String branch; - final String role; + final String email; + final String? rollNumber; + final String? about; + final String? profilePicURI; + final String? branch; + final int? graduationYear; + final List? skills; + final List? achievements; + final List? roles; + + Student({ + required this.id, + required this.name, + required this.email, + this.rollNumber, + this.about, + this.profilePicURI, + this.branch, + this.graduationYear, + this.skills, + this.achievements, + this.roles, + }); + + factory Student.fromJson(Map json) { + return Student( + id: json['_id'], + name: json['name'] ?? 'Smart Insti User', + email: json['email'], + rollNumber: json['rollNumber'], + about: json['about'], + profilePicURI: json['profilePicURI'], + branch: json['branch'], + graduationYear: json['graduationYear'], + skills: (json['skills'] as List) + .map((item) => Skill.fromJson(item as Map)) + .toList(), + achievements: (json['achievements'] as List) + .map((item) => Achievement.fromJson(item as Map)) + .toList(), + roles: (json['roles'] as List?)?.map((item) => item as String).toList(), + ); + } + + Map toJson() { + return { + '_id': id, + 'name': name, + 'email': email, + 'rollNumber': rollNumber, + 'about': about, + 'profilePicURI': profilePicURI, + 'branch': branch, + 'graduationYear': graduationYear, + 'skills': skills!.map((skill) => skill.toJson()).toList(), + 'achievements': + achievements!.map((achievement) => achievement.toJson()).toList(), + 'roles': roles, + }; + } } diff --git a/frontend/lib/models/student2.dart b/frontend/lib/models/student2.dart new file mode 100644 index 0000000..a388e30 --- /dev/null +++ b/frontend/lib/models/student2.dart @@ -0,0 +1,18 @@ +class Student { + Student( + {required this.name, + required this.studentMail, + required this.rollNumber, + required this.branch, + required this.role, + this.id, + this.collegeId}); + + final String? id; + final String? collegeId; + final String name; + final String studentMail; + final String rollNumber; + final String branch; + final String role; +} diff --git a/frontend/lib/provider/admin_provider.dart b/frontend/lib/provider/admin_provider.dart index ca785bf..bab3944 100644 --- a/frontend/lib/provider/admin_provider.dart +++ b/frontend/lib/provider/admin_provider.dart @@ -3,7 +3,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import 'package:smart_insti_app/components/menu_tile.dart'; -final adminProvider = StateNotifierProvider((ref) => AdminNotifier()); +final adminProvider = + StateNotifierProvider((ref) => AdminNotifier()); class AdminState { final bool toggleSearch; @@ -46,63 +47,63 @@ class AdminNotifier extends StateNotifier { List menuTiles = [ MenuTile( title: "Add\nStudents", - onTap: () => context.push('/add_students'), + onTap: () => context.push('/admin_home/add_students'), icon: Icons.add, primaryColor: Colors.redAccent.shade100, secondaryColor: Colors.redAccent.shade200, ), MenuTile( title: "View\nStudents", - onTap: () => context.push('/view_students'), + onTap: () => context.push('/admin_home/view_students'), icon: Icons.add, primaryColor: Colors.greenAccent.shade100, secondaryColor: Colors.greenAccent.shade200, ), MenuTile( title: "Add\nCourses", - onTap: () => context.push('/add_courses'), + onTap: () => context.push('/admin_home/add_courses'), icon: Icons.add, primaryColor: Colors.yellowAccent.shade100, secondaryColor: Colors.yellowAccent.shade200, ), MenuTile( title: "View\nCourses", - onTap: () => context.push('/view_courses'), + onTap: () => context.push('/admin_home/view_courses'), icon: Icons.add, primaryColor: Colors.lightBlueAccent.shade100, secondaryColor: Colors.lightBlueAccent.shade200, ), MenuTile( title: "Add\nFaculty", - onTap: () => context.push('/add_faculty'), + onTap: () => context.push('/admin_home/add_faculty'), icon: Icons.add, primaryColor: Colors.purpleAccent.shade100, secondaryColor: Colors.purpleAccent.shade200, ), MenuTile( title: "View\nFaculty", - onTap: () => context.push('/view_faculty'), + onTap: () => context.push('/admin_home/view_faculty'), icon: Icons.add, primaryColor: Colors.orangeAccent.shade100, secondaryColor: Colors.orangeAccent.shade200, ), MenuTile( title: "Add\nMess\nMenu", - onTap: () => context.push('/add_menu'), + onTap: () => context.push('/admin_home/add_menu'), icon: Icons.add, primaryColor: Colors.pinkAccent.shade100, secondaryColor: Colors.pinkAccent.shade200, ), MenuTile( title: "View\nMess\nMenu", - onTap: () => context.push('/view_menu'), + onTap: () => context.push('/admin_home/view_menu'), icon: Icons.add, primaryColor: Colors.blueAccent.shade100, secondaryColor: Colors.blueAccent.shade200, ), MenuTile( title: "Manage\nRooms", - onTap: () => context.push('/manage_rooms'), + onTap: () => context.push('/admin_home/manage_rooms'), icon: Icons.add, primaryColor: Colors.tealAccent.shade100, secondaryColor: Colors.tealAccent.shade200, @@ -110,7 +111,10 @@ class AdminNotifier extends StateNotifier { ]; String query = state.searchController.text; state = state.copyWith( - menuTiles: menuTiles.where((element) => element.title.toLowerCase().contains(query.toLowerCase())).toList()); + menuTiles: menuTiles + .where((element) => + element.title.toLowerCase().contains(query.toLowerCase())) + .toList()); } void toggleSearchBar() { diff --git a/frontend/lib/provider/courses_provider.dart b/frontend/lib/provider/courses_provider.dart index cef67c0..fad4b8a 100644 --- a/frontend/lib/provider/courses_provider.dart +++ b/frontend/lib/provider/courses_provider.dart @@ -7,7 +7,8 @@ import 'dart:io'; import '../constants/constants.dart'; import '../models/course.dart'; -final coursesProvider = StateNotifierProvider((ref) => CoursesNotifier()); +final coursesProvider = StateNotifierProvider( + (ref) => CoursesNotifier()); class CoursesState { final List courses; @@ -15,7 +16,7 @@ class CoursesState { final TextEditingController courseCodeController; final TextEditingController courseNameController; final TextEditingController searchCourseController; - final String branch; + final List branches; CoursesState({ required this.courses, @@ -23,25 +24,25 @@ class CoursesState { required this.courseCodeController, required this.courseNameController, required this.searchCourseController, - required this.branch, + required this.branches, }); CoursesState copyWith({ - List? branches, List? courses, List? filteredCourses, + List? branches, TextEditingController? courseCodeController, TextEditingController? courseNameController, TextEditingController? searchCourseController, - String? branch, }) { return CoursesState( courses: courses ?? this.courses, filteredCourses: filteredCourses ?? this.filteredCourses, courseCodeController: courseCodeController ?? this.courseCodeController, courseNameController: courseNameController ?? this.courseNameController, - searchCourseController: searchCourseController ?? this.searchCourseController, - branch: branch ?? this.branch, + searchCourseController: + searchCourseController ?? this.searchCourseController, + branches: branches ?? this.branches, ); } } @@ -56,7 +57,7 @@ class CoursesNotifier extends StateNotifier { courseCodeController: TextEditingController(), courseNameController: TextEditingController(), searchCourseController: TextEditingController(), - branch: Branches.branchList[0].value!, + branches: Branches.branchList.map((branch) => branch.value!).toList(), ); } @@ -92,8 +93,10 @@ class CoursesNotifier extends StateNotifier { String query = state.searchCourseController.text; _logger.i("Searching for courses with query $query"); state = state.copyWith( - filteredCourses: - state.courses.where((course) => course.courseName.toLowerCase().contains(query.toLowerCase())).toList()); + filteredCourses: state.courses + .where((course) => + course.courseName.toLowerCase().contains(query.toLowerCase())) + .toList()); } void removeCourse(Course course) { @@ -107,9 +110,10 @@ class CoursesNotifier extends StateNotifier { void addCourse() { _logger.i("Adding course ${state.courseCodeController.text}"); final newCourse = Course( + id: (state.courses.length + 1).toString(), courseCode: state.courseCodeController.text, courseName: state.courseNameController.text, - branch: state.branch, + branches: state.branches, ); state = state.copyWith( courses: [ @@ -118,11 +122,11 @@ class CoursesNotifier extends StateNotifier { ], courseCodeController: TextEditingController(), courseNameController: TextEditingController(), - branch: Branches.branchList[0].value!, + branches: Branches.branchList.map((branch) => branch.value!).toList(), ); } - void updateBranch(String newBranch) { - state = state.copyWith(branch: newBranch); + void updateBranch(List newBranches) { + state = state.copyWith(branches: newBranches); } } diff --git a/frontend/lib/provider/faculty_provider.dart b/frontend/lib/provider/faculty_provider.dart index e067328..74c1097 100644 --- a/frontend/lib/provider/faculty_provider.dart +++ b/frontend/lib/provider/faculty_provider.dart @@ -7,7 +7,9 @@ import '../constants/dummy_entries.dart'; import '../models/course.dart'; import '../models/faculty.dart'; -final facultyProvider = StateNotifierProvider((ref) => FacultyStateNotifier()); +final facultyProvider = + StateNotifierProvider( + (ref) => FacultyStateNotifier()); class FacultyState { final List faculties; @@ -38,9 +40,12 @@ class FacultyState { faculties: faculties ?? this.faculties, filteredFaculties: filteredFaculties ?? this.filteredFaculties, selectedCourses: selectedCourses ?? this.selectedCourses, - facultyNameController: facultyNameController ?? this.facultyNameController, - facultyEmailController: facultyEmailController ?? this.facultyEmailController, - searchFacultyController: searchFacultyController ?? this.searchFacultyController, + facultyNameController: + facultyNameController ?? this.facultyNameController, + facultyEmailController: + facultyEmailController ?? this.facultyEmailController, + searchFacultyController: + searchFacultyController ?? this.searchFacultyController, ); } } @@ -86,8 +91,9 @@ class FacultyStateNotifier extends StateNotifier { void addFaculty() { Faculty faculty = Faculty( + id: (state.faculties.length + 1).toString(), name: state.facultyNameController.text, - facultyMail: state.facultyEmailController.text, + email: state.facultyEmailController.text, courses: state.selectedCourses, ); state = state.copyWith( @@ -109,8 +115,10 @@ class FacultyStateNotifier extends StateNotifier { String query = state.searchFacultyController.text; _logger.i("Searching for faculty: $query"); state = state.copyWith( - filteredFaculties: - state.faculties.where((faculty) => faculty.name.toLowerCase().contains(query.toLowerCase())).toList(), + filteredFaculties: state.faculties + .where((faculty) => + faculty.name.toLowerCase().contains(query.toLowerCase())) + .toList(), ); } diff --git a/frontend/lib/provider/student_provider.dart b/frontend/lib/provider/student_provider.dart index 5213345..3a336a4 100644 --- a/frontend/lib/provider/student_provider.dart +++ b/frontend/lib/provider/student_provider.dart @@ -7,7 +7,8 @@ import 'package:smart_insti_app/constants/dummy_entries.dart'; import '../models/student.dart'; import 'dart:io'; -final studentProvider = StateNotifierProvider((ref) => StudentProvider()); +final studentProvider = StateNotifierProvider( + (ref) => StudentProvider()); class StudentState { final List students; @@ -43,10 +44,14 @@ class StudentState { return StudentState( students: students ?? this.students, filteredStudents: filteredStudents ?? this.filteredStudents, - studentNameController: studentNameController ?? this.studentNameController, - studentEmailController: studentEmailController ?? this.studentEmailController, - studentRollNoController: studentRollNoController ?? this.studentRollNoController, - searchStudentController: searchStudentController ?? this.searchStudentController, + studentNameController: + studentNameController ?? this.studentNameController, + studentEmailController: + studentEmailController ?? this.studentEmailController, + studentRollNoController: + studentRollNoController ?? this.studentRollNoController, + searchStudentController: + searchStudentController ?? this.searchStudentController, branch: branch ?? this.branch, role: role ?? this.role, ); @@ -100,8 +105,10 @@ class StudentProvider extends StateNotifier { String query = state.searchStudentController.text; _logger.i("Searching for student: $query"); final newState = state.copyWith( - filteredStudents: - state.students.where((student) => student.name.toLowerCase().contains(query.toLowerCase())).toList(), + filteredStudents: state.students + .where((student) => + student.name.toLowerCase().contains(query.toLowerCase())) + .toList(), ); state = newState; } @@ -120,11 +127,11 @@ class StudentProvider extends StateNotifier { final newState = state.copyWith( students: [ Student( + id: (state.students.length + 1).toString(), name: state.studentNameController.text, - studentMail: state.studentEmailController.text, + email: state.studentEmailController.text, rollNumber: state.studentRollNoController.text, branch: state.branch, - role: state.role, ), ...state.students, ], @@ -139,7 +146,8 @@ class StudentProvider extends StateNotifier { void removeStudent(Student student) { final newStudents = state.students.where((s) => s != student).toList(); - final newFilteredStudents = state.filteredStudents.where((s) => s != student).toList(); + final newFilteredStudents = + state.filteredStudents.where((s) => s != student).toList(); final newState = state.copyWith( students: newStudents, filteredStudents: newFilteredStudents, diff --git a/frontend/lib/routes/routes.dart b/frontend/lib/routes/routes.dart index 298b664..c87e66d 100644 --- a/frontend/lib/routes/routes.dart +++ b/frontend/lib/routes/routes.dart @@ -10,50 +10,67 @@ import '../screens/admin/add_menu.dart'; import '../screens/admin/view_courses.dart'; import '../screens/admin/view_faculty.dart'; import '../screens/admin/view_menu.dart'; +import '../screens/auth/login_page.dart'; final GoRouter routes = GoRouter( routes: [ GoRoute( path: '/', - pageBuilder: (context, state) => const MaterialPage(child: AdminHome()), + pageBuilder: (context, state) => MaterialPage(child: SignIn()), routes: [ GoRoute( - path: 'add_students', - pageBuilder: (context, state) => MaterialPage(child: AddStudents()), + path: 'admin_home', + pageBuilder: (context, state) => + const MaterialPage(child: AdminHome()), + routes: [ + GoRoute( + path: 'add_students', + pageBuilder: (context, state) => + MaterialPage(child: AddStudents()), + ), + GoRoute( + path: 'add_faculty', + pageBuilder: (context, state) => + MaterialPage(child: AddFaculty()), + ), + GoRoute( + path: 'add_courses', + pageBuilder: (context, state) => + MaterialPage(child: AddCourses()), + ), + GoRoute( + path: 'view_students', + pageBuilder: (context, state) => + MaterialPage(child: ViewStudents()), + ), + GoRoute( + path: 'view_faculty', + pageBuilder: (context, state) => + MaterialPage(child: ViewFaculty()), + ), + GoRoute( + path: 'view_courses', + pageBuilder: (context, state) => + MaterialPage(child: ViewCourses()), + ), + GoRoute( + path: 'add_menu', + pageBuilder: (context, state) => + MaterialPage(child: AddMessMenu()), + ), + GoRoute( + path: 'view_menu', + pageBuilder: (context, state) => + MaterialPage(child: ViewMessMenu()), + ), + GoRoute( + path: 'manage_rooms', + pageBuilder: (context, state) => + MaterialPage(child: ManageRooms()), + ) + ], ), - GoRoute( - path: 'add_faculty', - pageBuilder: (context, state) => MaterialPage(child: AddFaculty()), - ), - GoRoute( - path: 'add_courses', - pageBuilder: (context, state) => MaterialPage(child: AddCourses()), - ), - GoRoute( - path: 'view_students', - pageBuilder: (context, state) => MaterialPage(child: ViewStudents()), - ), - GoRoute( - path: 'view_faculty', - pageBuilder: (context, state) => MaterialPage(child: ViewFaculty()), - ), - GoRoute( - path: 'view_courses', - pageBuilder: (context, state) => MaterialPage(child: ViewCourses()), - ), - GoRoute( - path: 'add_menu', - pageBuilder: (context, state) => MaterialPage(child: AddMessMenu()), - ), - GoRoute( - path: 'view_menu', - pageBuilder: (context, state) => MaterialPage(child: ViewMessMenu()), - ), - GoRoute( - path: 'manage_rooms', - pageBuilder: (context, state) => MaterialPage(child: ManageRooms()), - ) ], - ) + ), ], ); diff --git a/frontend/lib/screens/admin/add_courses.dart b/frontend/lib/screens/admin/add_courses.dart index adbc97d..fed4152 100644 --- a/frontend/lib/screens/admin/add_courses.dart +++ b/frontend/lib/screens/admin/add_courses.dart @@ -46,8 +46,12 @@ class AddCourses extends ConsumerWidget { ), const SizedBox(width: 30), ElevatedButton( - onPressed: () => ref.read(coursesProvider.notifier).pickSpreadsheet(), - style: ButtonStyle(minimumSize: MaterialStateProperty.all(const Size(200, 60))), + onPressed: () => ref + .read(coursesProvider.notifier) + .pickSpreadsheet(), + style: ButtonStyle( + minimumSize: + MaterialStateProperty.all(const Size(200, 60))), child: const Text("Upload Spreadsheet"), ), ], @@ -80,14 +84,17 @@ class AddCourses extends ConsumerWidget { const SizedBox(height: 30), MaterialTextFormField( controller: course.courseCodeController, - validator: (value) => Validators.courseCodeValidator(value), + validator: (value) => + Validators.courseCodeValidator(value), hintText: "Enter course code", hintColor: Colors.teal.shade900.withOpacity(0.5), ), const SizedBox(height: 30), ChoiceSelector( - onChanged: (value) => ref.read(coursesProvider.notifier).updateBranch(value), - value: course.branch, + onChanged: (value) => ref + .read(coursesProvider.notifier) + .updateBranch(value), + value: course.branches[0], items: Branches.branchList, hint: "Select Branch", ), @@ -103,7 +110,9 @@ class AddCourses extends ConsumerWidget { ); } }, - style: ButtonStyle(minimumSize: MaterialStateProperty.all(const Size(200, 60))), + style: ButtonStyle( + minimumSize: MaterialStateProperty.all( + const Size(200, 60))), child: const Text("Add Course"), ), ), diff --git a/frontend/lib/screens/admin/add_students.dart b/frontend/lib/screens/admin/add_students.dart index ba3e324..26c5bd6 100644 --- a/frontend/lib/screens/admin/add_students.dart +++ b/frontend/lib/screens/admin/add_students.dart @@ -45,8 +45,12 @@ class AddStudents extends ConsumerWidget { ), const SizedBox(width: 30), ElevatedButton( - onPressed: () => ref.read(studentProvider.notifier).pickSpreadsheet(), - style: ButtonStyle(minimumSize: MaterialStateProperty.all(const Size(200, 60))), + onPressed: () => ref + .read(studentProvider.notifier) + .pickSpreadsheet(), + style: ButtonStyle( + minimumSize: + MaterialStateProperty.all(const Size(200, 60))), child: const Text("Upload Spreadsheet"), ), ], @@ -71,35 +75,47 @@ class AddStudents extends ConsumerWidget { child: Column( children: [ MaterialTextFormField( - controller: ref.watch(studentProvider.notifier).studentNameController, + controller: ref + .watch(studentProvider.notifier) + .studentNameController, validator: (value) => Validators.nameValidator(value), hintText: "Enter Student Name", hintColor: Colors.teal.shade900.withOpacity(0.5), ), const SizedBox(height: 30), MaterialTextFormField( - controller: ref.read(studentProvider.notifier).studentRollNoController, - validator: (value) => Validators.rollNumberValidator(value), + controller: ref + .read(studentProvider.notifier) + .studentRollNoController, + validator: (value) => + Validators.rollNumberValidator(value), hintText: "Enter Roll Number", hintColor: Colors.teal.shade900.withOpacity(0.5), ), const SizedBox(height: 30), MaterialTextFormField( - controller: ref.read(studentProvider.notifier).studentEmailController, - validator: (value) => Validators.emailValidator(value), + controller: ref + .read(studentProvider.notifier) + .studentEmailController, + validator: (value) => + Validators.emailValidator(value), hintText: "Enter Student Mail", hintColor: Colors.teal.shade900.withOpacity(0.5), ), const SizedBox(height: 30), ChoiceSelector( - onChanged: (value) => ref.read(studentProvider.notifier).updateBranch(value!), + onChanged: (value) => ref + .read(studentProvider.notifier) + .updateBranch(value!), value: ref.watch(studentProvider).branch, items: Branches.branchList, hint: "Select Branch", ), const SizedBox(height: 30), ChoiceSelector( - onChanged: (value) => ref.read(studentProvider.notifier).updateRole(value!), + onChanged: (value) => ref + .read(studentProvider.notifier) + .updateRole(value!), value: ref.watch(studentProvider).role, items: StudentRoles.studentRoleList, hint: "Select student role", @@ -112,11 +128,14 @@ class AddStudents extends ConsumerWidget { if (_formKey.currentState!.validate()) { ref.read(studentProvider.notifier).addStudent(); ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text('Added Student')), + const SnackBar( + content: Text('Added Student')), ); } }, - style: ButtonStyle(minimumSize: MaterialStateProperty.all(const Size(200, 60))), + style: ButtonStyle( + minimumSize: MaterialStateProperty.all( + const Size(200, 60))), child: const Text("Add Student"), ), ), diff --git a/frontend/lib/screens/admin/view_faculty.dart b/frontend/lib/screens/admin/view_faculty.dart index 82f19a1..a55de33 100644 --- a/frontend/lib/screens/admin/view_faculty.dart +++ b/frontend/lib/screens/admin/view_faculty.dart @@ -26,7 +26,9 @@ class ViewFaculty extends ConsumerWidget { child: SizedBox( width: 390, child: SearchBar( - controller: ref.read(facultyProvider.notifier).searchFacultyController, + controller: ref + .read(facultyProvider.notifier) + .searchFacultyController, hintText: 'Enter faculty name', onChanged: (value) { ref.read(facultyProvider.notifier).searchFaculties(); @@ -59,18 +61,22 @@ class ViewFaculty extends ConsumerWidget { } return ListView.builder( itemBuilder: (_, index) { - List faculties = ref.read(facultyProvider).filteredFaculties; + List faculties = + ref.read(facultyProvider).filteredFaculties; return Container( - margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + margin: const EdgeInsets.symmetric( + horizontal: 20, vertical: 10), child: ListTile( tileColor: Colors.grey.shade200, selectedTileColor: Colors.red, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(15), ), - contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + contentPadding: const EdgeInsets.symmetric( + horizontal: 20, vertical: 10), title: Text('Faculty : ${faculties[index].name}'), - subtitle: Text('Faculty Email : ${faculties[index].facultyMail}'), + subtitle: + Text('Faculty Email : ${faculties[index].email}'), trailing: SizedBox( width: 100, child: Row( @@ -78,18 +84,21 @@ class ViewFaculty extends ConsumerWidget { IconButton( iconSize: 20, icon: const Icon(Icons.edit), - onPressed: () => showDialog( + onPressed: () => showDialog( context: context, builder: (_) => const AlertDialog( title: Text('Edit Faculty'), - content: Text("Faculty editing will be added in future"), + content: Text( + "Faculty editing will be added in future"), ), ), ), IconButton( iconSize: 20, icon: const Icon(Icons.delete), - onPressed: () => ref.read(facultyProvider.notifier).removeFaculty(faculties[index]), + onPressed: () => ref + .read(facultyProvider.notifier) + .removeFaculty(faculties[index]), ), ], ), diff --git a/frontend/lib/screens/auth/login_page.dart b/frontend/lib/screens/auth/login_page.dart new file mode 100644 index 0000000..1a8338d --- /dev/null +++ b/frontend/lib/screens/auth/login_page.dart @@ -0,0 +1,160 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:slide_switcher/slide_switcher.dart'; +import '../../components/snackbar.dart'; +import '../../services/auth/auth_service.dart'; + +class SignIn extends StatefulWidget { + @override + _SignInState createState() => _SignInState(); +} + +class _SignInState extends State { + bool showOTPFields = false; + final emailRegex = RegExp(r'^[a-zA-Z0-9.]+@[a-zA-Z0-9]+\.[a-zA-Z]+'); + final emailController = TextEditingController(); + final otpController1 = TextEditingController(); + final otpController2 = TextEditingController(); + final otpController3 = TextEditingController(); + final otpController4 = TextEditingController(); + + final focusNode1 = FocusNode(); + final focusNode2 = FocusNode(); + final focusNode3 = FocusNode(); + final focusNode4 = FocusNode(); + + final authService = AuthService(); // Create an instance of AuthService + + @override + void initState() { + super.initState(); + + // When the text in the first OTPBox changes, request focus for the second OTPBox + otpController1.addListener(() { + if (otpController1.text.length >= 1) { + FocusScope.of(context).requestFocus(focusNode2); + } + }); + + // Do the same for the other OTPBoxes + otpController2.addListener(() { + if (otpController2.text.length >= 1) { + FocusScope.of(context).requestFocus(focusNode3); + } + }); + + otpController3.addListener(() { + if (otpController3.text.length >= 1) { + FocusScope.of(context).requestFocus(focusNode4); + } + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Login'), + ), + body: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + TextField( + controller: emailController, + decoration: InputDecoration( + labelText: 'Email', + ), + ), + SizedBox(height: 16.0), + ElevatedButton( + onPressed: () { + // Call sendOtp when the button is clicked + if (emailRegex.hasMatch(emailController.text)) { + // If the email is valid, set the state + setState(() { + showOTPFields = true; + }); + authService.sendOTP( + context: context, + email: emailController.text, + ); + } else { + // If the email is not valid, show a SnackBar with an error message + showSnackBar( + context, + 'Please enter a valid email', + ); + } + }, + child: Text('Send OTP'), + ), + if (showOTPFields) ...[ + SizedBox(height: 16.0), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + OTPBox(controller: otpController1, focusNode: focusNode1), + OTPBox(controller: otpController2, focusNode: focusNode2), + OTPBox(controller: otpController3, focusNode: focusNode3), + OTPBox(controller: otpController4, focusNode: focusNode4), + ], + ), + ElevatedButton( + onPressed: () async { + final otp = otpController1.text + + otpController2.text + + otpController3.text + + otpController4.text; + // Call verifyOTP + final isVerified = + await authService.verifyOTP(emailController.text, otp); + + if (isVerified) { + // Navigate to the admin home page + context.go('/admin_home'); + } else { + showSnackBar( + context, + 'Incorrect OTP', + ); + } + }, + child: Text('Verify OTP'), + ), + ], + ], + ), + ), + ); + } +} + +class OTPBox extends StatelessWidget { + final TextEditingController controller; + final FocusNode focusNode; + OTPBox({required this.controller, required this.focusNode}); + @override + Widget build(BuildContext context) { + return Container( + width: 50.0, + height: 50.0, + decoration: BoxDecoration( + border: Border.all(color: Colors.grey), + borderRadius: BorderRadius.circular(8.0), + ), + child: TextField( + controller: controller, + focusNode: focusNode, + keyboardType: TextInputType.number, + maxLength: 1, + textAlign: TextAlign.center, + decoration: InputDecoration( + counterText: '', + border: InputBorder.none, + ), + ), + ); + } +} diff --git a/frontend/lib/services/auth/auth_service.dart b/frontend/lib/services/auth/auth_service.dart new file mode 100644 index 0000000..53234c2 --- /dev/null +++ b/frontend/lib/services/auth/auth_service.dart @@ -0,0 +1,67 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:http/http.dart' as http; + +import '../../components/snackbar.dart'; +import '../../constants/error_handling.dart'; + +class AuthService { + final storage = FlutterSecureStorage(); + final String baseUrl = + 'http://10.0.2.2:3000'; // Replace with your backend API URL + + Future sendOTP({ + required BuildContext context, + required String email, + }) async { + try { + http.Response res = await http.post( + Uri.parse('$baseUrl/send-otp'), + body: jsonEncode({'email': email}), + headers: { + 'Content-Type': 'application/json; charset=UTF-8', + }, + ); + httpErrorHandle( + response: res, + context: context, + onSuccess: () { + showSnackBar( + context, + 'OTP sent successfully', + ); + }, + ); + } catch (e) { + showSnackBar(context, e.toString()); + print(e); + } + } + + Future verifyOTP(String email, String otp) async { + try { + final response = await http.post( + Uri.parse('$baseUrl/verify-otp'), + body: jsonEncode({'email': email, 'otp': otp}), + headers: { + 'Content-Type': 'application/json; charset=UTF-8', + }, + ); + + if (response.statusCode == 200) { + final Map data = jsonDecode(response.body); + final String jwt = data['token']; + await storage.write(key: 'jwt', value: jwt); + return true; + } else { + return false; + } + } catch (e) { + // Handle network or server error + print(e); + return false; + } + } +} diff --git a/frontend/pubspec.lock b/frontend/pubspec.lock index ae170d8..b090a43 100644 --- a/frontend/pubspec.lock +++ b/frontend/pubspec.lock @@ -153,6 +153,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + email_validator: + dependency: "direct main" + description: + name: email_validator + sha256: e9a90f27ab2b915a27d7f9c2a7ddda5dd752d6942616ee83529b686fc086221b + url: "https://pub.dev" + source: hosted + version: "2.1.17" fake_async: dependency: transitive description: diff --git a/frontend/pubspec.yaml b/frontend/pubspec.yaml index 2f3238c..e8f4574 100644 --- a/frontend/pubspec.yaml +++ b/frontend/pubspec.yaml @@ -50,6 +50,7 @@ dependencies: grouped_list: ^5.1.2 slide_switcher: ^1.1.2 awesome_snackbar_content: ^0.1.1 + email_validator: ^2.1.17 delightful_toast: ^1.1.0 dev_dependencies: From d60913f4603d37611ecd6f97e78487610bc800b3 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Thu, 1 Feb 2024 00:44:20 +0530 Subject: [PATCH 02/29] user profile with admin screens integration --- frontend/lib/constants/dummy.dart | 88 ++++ frontend/lib/models/student2.dart | 47 +++ frontend/lib/provider/student_provider.dart | 24 +- frontend/lib/routes/routes.dart | 136 ++++-- frontend/lib/routes/student_provide.dart | 26 ++ frontend/lib/screens/home.dart | 108 ++++- frontend/lib/screens/user_profile.dart | 438 ++++++++++++++++++++ 7 files changed, 820 insertions(+), 47 deletions(-) create mode 100644 frontend/lib/constants/dummy.dart create mode 100644 frontend/lib/models/student2.dart create mode 100644 frontend/lib/routes/student_provide.dart create mode 100644 frontend/lib/screens/user_profile.dart diff --git a/frontend/lib/constants/dummy.dart b/frontend/lib/constants/dummy.dart new file mode 100644 index 0000000..1889ec6 --- /dev/null +++ b/frontend/lib/constants/dummy.dart @@ -0,0 +1,88 @@ +// import '../screens/user_profile.dart'; +import '../models/student2.dart'; + +// class DummyStudents { +// static Student getStudentById(String id) { +// return students.firstWhere( +// (student) => student.id == id, +// orElse: () => Student( +// id: '1', +// name: 'John Doe', +// studentMail: 'john.doe@example.com', +// rollNumber: '12345678', +// about: 'Hi, I am a CSE Undergrad of IIT BHOPAL.', +// profilePicURI: +// 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', +// graduationYear: '2026', +// branch: 'Computer Science', +// roles: ['Openlake Core Member', 'Class Representative'], +// skills: ['Flutter', 'Dart'], +// achievements: [ +// Achievement( +// title: 'Hackathon Winner', +// description: 'First place in XYZ Hackathon', +// ), +// Achievement( +// title: 'Project Showcase', +// description: 'Presented a project at ABC Expo', +// ), +// ], +// ), +// ); +// } + +// static List students = [ +// // Existing students... +// // Add more students with skills and achievements as needed +// ]; +// } +class DummyStudents { + static List students = [ + Student( + id: '1', + name: 'John Doe', + studentMail: 'john.doe@example.com', + rollNumber: '12345678', + about: 'Hi , i am a CSE Undergrad of IIT BHOPAL.', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', + graduationYear: '2026', + branch: 'Computer Science', + roles: ['Openlake Core Member', 'Class Representative'], + skills: ['Flutter', 'Dart'], + achievements: [ + Achievement( + title: 'Hackathon Winner', + description: 'First place in XYZ Hackathon', + ), + Achievement( + title: 'Project Showcase', + description: 'Presented a project at ABC Expo', + ), + ], + ), + Student( + id: '2', + name: 'Talla', + studentMail: 'talla.doe@example.com', + rollNumber: '12345789', + about: 'Hi , i am a CSE Undergrad of IIT BHOjpur.', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', + graduationYear: '2025', + branch: 'Computer Science', + roles: ['Openlake Core Member', 'Class Representative'], + skills: ['Flutter', 'Dart'], + achievements: [ + Achievement( + title: 'Hackathon Winner', + description: 'First place in XYZ Hackathon', + ), + Achievement( + title: 'Project Showcase', + description: 'Presented a project at ABC Expo', + ), + ], + ), + ]; +} diff --git a/frontend/lib/models/student2.dart b/frontend/lib/models/student2.dart new file mode 100644 index 0000000..1222ce5 --- /dev/null +++ b/frontend/lib/models/student2.dart @@ -0,0 +1,47 @@ +class Student { + Student({ + required this.id, + required this.name, + required this.studentMail, + required this.rollNumber, + this.about, + this.profilePicURI, + this.graduationYear, + required this.branch, + this.roles, + this.skills, + this.achievements, + }); + + final String id; + final String name; + final String studentMail; + final String rollNumber; + String? about; + final String? profilePicURI; + final String? graduationYear; + final String branch; + final List? roles; + List? skills; + List? achievements; +} + +class Skills { + final String text; + final double proficiency; + + Skills({ + required this.text, + required this.proficiency, + }); +} + +class Achievement { + final String title; + final String description; + + Achievement({ + required this.title, + required this.description, + }); +} diff --git a/frontend/lib/provider/student_provider.dart b/frontend/lib/provider/student_provider.dart index 5213345..e4e15ca 100644 --- a/frontend/lib/provider/student_provider.dart +++ b/frontend/lib/provider/student_provider.dart @@ -7,7 +7,8 @@ import 'package:smart_insti_app/constants/dummy_entries.dart'; import '../models/student.dart'; import 'dart:io'; -final studentProvider = StateNotifierProvider((ref) => StudentProvider()); +final studentProvider = StateNotifierProvider( + (ref) => StudentProvider()); class StudentState { final List students; @@ -43,10 +44,14 @@ class StudentState { return StudentState( students: students ?? this.students, filteredStudents: filteredStudents ?? this.filteredStudents, - studentNameController: studentNameController ?? this.studentNameController, - studentEmailController: studentEmailController ?? this.studentEmailController, - studentRollNoController: studentRollNoController ?? this.studentRollNoController, - searchStudentController: searchStudentController ?? this.searchStudentController, + studentNameController: + studentNameController ?? this.studentNameController, + studentEmailController: + studentEmailController ?? this.studentEmailController, + studentRollNoController: + studentRollNoController ?? this.studentRollNoController, + searchStudentController: + searchStudentController ?? this.searchStudentController, branch: branch ?? this.branch, role: role ?? this.role, ); @@ -100,8 +105,10 @@ class StudentProvider extends StateNotifier { String query = state.searchStudentController.text; _logger.i("Searching for student: $query"); final newState = state.copyWith( - filteredStudents: - state.students.where((student) => student.name.toLowerCase().contains(query.toLowerCase())).toList(), + filteredStudents: state.students + .where((student) => + student.name.toLowerCase().contains(query.toLowerCase())) + .toList(), ); state = newState; } @@ -139,7 +146,8 @@ class StudentProvider extends StateNotifier { void removeStudent(Student student) { final newStudents = state.students.where((s) => s != student).toList(); - final newFilteredStudents = state.filteredStudents.where((s) => s != student).toList(); + final newFilteredStudents = + state.filteredStudents.where((s) => s != student).toList(); final newState = state.copyWith( students: newStudents, filteredStudents: newFilteredStudents, diff --git a/frontend/lib/routes/routes.dart b/frontend/lib/routes/routes.dart index 298b664..48b74d5 100644 --- a/frontend/lib/routes/routes.dart +++ b/frontend/lib/routes/routes.dart @@ -10,50 +10,120 @@ import '../screens/admin/add_menu.dart'; import '../screens/admin/view_courses.dart'; import '../screens/admin/view_faculty.dart'; import '../screens/admin/view_menu.dart'; +import '../screens/user_profile.dart'; +import '../screens/home.dart'; final GoRouter routes = GoRouter( routes: [ GoRoute( path: '/', - pageBuilder: (context, state) => const MaterialPage(child: AdminHome()), + pageBuilder: (context, state) => const MaterialPage(child: Home()), routes: [ GoRoute( - path: 'add_students', - pageBuilder: (context, state) => MaterialPage(child: AddStudents()), + path: 'user_profile', + pageBuilder: (context, state) => + const MaterialPage(child: UserProfile()), ), GoRoute( - path: 'add_faculty', - pageBuilder: (context, state) => MaterialPage(child: AddFaculty()), + path: 'admin_home', + pageBuilder: (context, state) => + const MaterialPage(child: AdminHome()), + routes: [ + GoRoute( + path: 'add_students', + pageBuilder: (context, state) => + MaterialPage(child: AddStudents()), + ), + GoRoute( + path: 'add_faculty', + pageBuilder: (context, state) => + MaterialPage(child: AddFaculty()), + ), + GoRoute( + path: 'add_courses', + pageBuilder: (context, state) => + MaterialPage(child: AddCourses()), + ), + GoRoute( + path: 'view_students', + pageBuilder: (context, state) => + MaterialPage(child: ViewStudents()), + ), + GoRoute( + path: 'view_faculty', + pageBuilder: (context, state) => + MaterialPage(child: ViewFaculty()), + ), + GoRoute( + path: 'view_courses', + pageBuilder: (context, state) => + MaterialPage(child: ViewCourses()), + ), + GoRoute( + path: 'add_menu', + pageBuilder: (context, state) => + MaterialPage(child: AddMessMenu()), + ), + GoRoute( + path: 'view_menu', + pageBuilder: (context, state) => + MaterialPage(child: ViewMessMenu()), + ), + GoRoute( + path: 'manage_rooms', + pageBuilder: (context, state) => + MaterialPage(child: ManageRooms()), + ) + ], ), - GoRoute( - path: 'add_courses', - pageBuilder: (context, state) => MaterialPage(child: AddCourses()), - ), - GoRoute( - path: 'view_students', - pageBuilder: (context, state) => MaterialPage(child: ViewStudents()), - ), - GoRoute( - path: 'view_faculty', - pageBuilder: (context, state) => MaterialPage(child: ViewFaculty()), - ), - GoRoute( - path: 'view_courses', - pageBuilder: (context, state) => MaterialPage(child: ViewCourses()), - ), - GoRoute( - path: 'add_menu', - pageBuilder: (context, state) => MaterialPage(child: AddMessMenu()), - ), - GoRoute( - path: 'view_menu', - pageBuilder: (context, state) => MaterialPage(child: ViewMessMenu()), - ), - GoRoute( - path: 'manage_rooms', - pageBuilder: (context, state) => MaterialPage(child: ManageRooms()), - ) ], ) ], ); + +// final GoRouter routes = GoRouter( +// routes: [ +// GoRoute( +// path: '/', +// pageBuilder: (context, state) => const MaterialPage(child: AdminHome()), +// routes: [ +// GoRoute( +// path: 'add_students', +// pageBuilder: (context, state) => MaterialPage(child: AddStudents()), +// ), +// GoRoute( +// path: 'add_faculty', +// pageBuilder: (context, state) => MaterialPage(child: AddFaculty()), +// ), +// GoRoute( +// path: 'add_courses', +// pageBuilder: (context, state) => MaterialPage(child: AddCourses()), +// ), +// GoRoute( +// path: 'view_students', +// pageBuilder: (context, state) => MaterialPage(child: ViewStudents()), +// ), +// GoRoute( +// path: 'view_faculty', +// pageBuilder: (context, state) => MaterialPage(child: ViewFaculty()), +// ), +// GoRoute( +// path: 'view_courses', +// pageBuilder: (context, state) => MaterialPage(child: ViewCourses()), +// ), +// GoRoute( +// path: 'add_menu', +// pageBuilder: (context, state) => MaterialPage(child: AddMessMenu()), +// ), +// GoRoute( +// path: 'view_menu', +// pageBuilder: (context, state) => MaterialPage(child: ViewMessMenu()), +// ), +// GoRoute( +// path: 'manage_rooms', +// pageBuilder: (context, state) => MaterialPage(child: ManageRooms()), +// ) +// ], +// ) +// ], +// ); diff --git a/frontend/lib/routes/student_provide.dart b/frontend/lib/routes/student_provide.dart new file mode 100644 index 0000000..b7d2f96 --- /dev/null +++ b/frontend/lib/routes/student_provide.dart @@ -0,0 +1,26 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import '../models/student2.dart'; + +final studentProvider = Provider((ref) => Student( + id: '1', + name: 'John Doe', + studentMail: 'john.doe@example.com', + rollNumber: '12345678', + about: 'Hi , i am a CSE Undergrad of IIT BHOPAL.', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', + graduationYear: '2026', + branch: 'Computer Science', + roles: ['Openlake Core Member', 'Class Representative'], + skills: ['Flutter', 'Dart'], + achievements: [ + Achievement( + title: 'Hackathon Winner', + description: 'First place in XYZ Hackathon', + ), + Achievement( + title: 'Project Showcase', + description: 'Presented a project at ABC Expo', + ), + ], + )); diff --git a/frontend/lib/screens/home.dart b/frontend/lib/screens/home.dart index 2b8b54a..3ded539 100644 --- a/frontend/lib/screens/home.dart +++ b/frontend/lib/screens/home.dart @@ -1,21 +1,117 @@ import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../constants/constants.dart'; +import '../routes/student_provide.dart'; +// import '../screens/user_profile.dart'; -class Home extends StatelessWidget { - const Home({super.key}); +class Home extends ConsumerWidget { + const Home({Key? key}); @override - Widget build(BuildContext context) { + Widget build(BuildContext context, WidgetRef ref) { + final student = ref.read(studentProvider); + return SafeArea( child: Scaffold( appBar: AppBar( - title: const Text(AppConstants.appName), + title: const Text( + AppConstants.appName, + ), backgroundColor: Colors.lightBlueAccent, + actions: [ + IconButton( + icon: const Icon(Icons.person), + onPressed: () { + context.push('/user_profile'); + }, + ), + IconButton( + icon: const Icon(Icons.admin_panel_settings), + onPressed: () { + context.push('/admin_home'); + }, + ), + ], ), - body: const Center( - child: Text(AppConstants.appName), + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: 16), + Text( + 'Welcome, ${student.name}!', + style: + const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 16), + const Text('Tap the icon to view your profile.'), + ], + ), ), ), ); } } + + +// class Home extends ConsumerWidget { +// const Home({Key? key}); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final student = ref.read(studentProvider); + +// return SafeArea( +// child: Scaffold( +// appBar: AppBar( +// title: const Text( +// AppConstants.appName, +// // style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), +// ), +// backgroundColor: Colors.lightBlueAccent, +// ), +// body: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Align( +// alignment: Alignment.centerRight, +// child: Padding( +// padding: const EdgeInsets.only(right: 8.0), +// child: GestureDetector( +// onTap: () { +// context.push('/user_profile'); +// }, +// child: Container( +// width: 50, +// height: 50, +// decoration: const BoxDecoration( +// shape: BoxShape.circle, +// color: Colors.lightBlue, +// ), +// child: const Icon( +// Icons.person, +// color: Colors.white, +// ), +// ), +// ), +// ), +// ), +// const SizedBox(height: 16), +// Text( +// 'Welcome, ${student.name}!', +// style: +// const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), +// ), +// const SizedBox(height: 16), +// const Text('Tap the icon to view your profile.'), +// ], +// ), +// ), +// ), +// ); +// } +// } diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart new file mode 100644 index 0000000..6ae0b8c --- /dev/null +++ b/frontend/lib/screens/user_profile.dart @@ -0,0 +1,438 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../constants/dummy.dart'; + +import '../models/student2.dart'; +import '../routes/student_provide.dart'; + +bool isEditMode = false; +TextEditingController achievementsController = TextEditingController(); + +class UserProfile extends ConsumerWidget { + const UserProfile({super.key}); + @override + Widget build(BuildContext context, WidgetRef ref) { + final student = ref.read(studentProvider); + final TextEditingController aboutController = + TextEditingController(text: student.about); + final TextEditingController skillsController = + TextEditingController(text: student.skills?.join(", ") ?? ""); + // final TextEditingController achievementController = TextEditingController(); + // final TextEditingController achievementsController = TextEditingController( + // text: student.achievements?.map((ach) => "${ach.title}: ${ach.description}").join("\n") ?? ""); + + // bool isEditMode = false; + + return Scaffold( + appBar: AppBar( + title: const Text('User Profile'), + actions: [ + IconButton( + icon: Icon(isEditMode ? Icons.save : Icons.edit), + onPressed: () { + ref.refresh(studentProvider); + + // setState(() { + // if (isEditMode) { + // // Save changes to the student object + // // student.about = aboutController.text; + // // student.skills = skillsController.text.split(", ").toList(); + // // student.achievements = _parseAchievements(); + // } + // isEditMode = !isEditMode; + // }); + }, + ), + ], + ), + body: Container( + decoration: const BoxDecoration( + color: Colors.lightBlueAccent, + ), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + CircleAvatar( + backgroundImage: student.profilePicURI != null + ? NetworkImage(student.profilePicURI!) + : const AssetImage('assets/openlake.png') + as ImageProvider, + radius: 55, + child: student.profilePicURI == null + ? const Icon( + Icons.person, + size: 55, + color: Colors.grey, + ) + : null, + ), + const SizedBox(height: 16), + Card( + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.0), + ), + elevation: 5, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + student.name, + style: const TextStyle( + fontSize: 28, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 16), + buildInfoRow("ID", student.rollNumber), + buildInfoRow("Email", student.studentMail), + buildInfoRow("Branch", student.branch), + buildInfoRow( + "Class of", student.graduationYear ?? "202x"), + const SizedBox(height: 16), + _buildEditableField( + "About", + aboutController, + isEditMode, + ), + const SizedBox(height: 16), + _buildEditableField( + "Roles", + null, + isEditMode, + values: student.roles, + ), + const SizedBox(height: 16), + _buildEditableField( + "Skills", + skillsController, + isEditMode, + ), + const SizedBox(height: 16), + buildAchievementsColumn(student.achievements), + ], + ), + ), + ), + ], + ), + ), + ), + ); + } + + Widget buildInfoRow(String title, String value) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + title, + style: const TextStyle( + fontWeight: FontWeight.bold, + ), + ), + Text(value), + ], + ); + } + + Widget _buildEditableField( + String title, + TextEditingController? controller, + bool isEditable, { + List? values, + }) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: const TextStyle( + fontWeight: FontWeight.bold, + ), + ), + if (isEditable) ...[ + if (controller != null) TextField(controller: controller), + if (values != null) ...[ + for (var value in values) Text('- $value'), + ] + ] else ...[ + if (values != null && values.isNotEmpty) + for (var value in values) Text('- $value'), + if (values == null || values.isEmpty) const Text('- No Information'), + ], + ], + ); + } + + Widget buildAchievementsColumn(List? achievements) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Achievements:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + if (isEditMode) ...[ + if (achievementsController != null) + TextField(controller: achievementsController), + ] else ...[ + if (achievements != null) + for (var achievement in achievements) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('- ${achievement.title}'), + Text(' ${achievement.description}'), + ], + ), + ], + ], + ); + } + + // List? _parseAchievements() { + // final lines = achievementsController.text.split("\n"); + // return lines + // .map((line) { + // final parts = line.split(": "); + // return Achievement(title: parts[0], description: parts[1]); + // }) + // .where((ach) => ach.title.isNotEmpty && ach.description.isNotEmpty) + // .toList(); + // } +} +// import 'package:flutter/material.dart'; +// import '../constants/dummy.dart'; +// import '../models/student.dart'; + +// class UserProfile extends StatefulWidget { +// @override +// _UserProfileState createState() => _UserProfileState(); +// } + +// class _UserProfileState extends State { +// late TextEditingController aboutController; +// late TextEditingController skillsController; +// late TextEditingController achievementsController; + +// bool isEditMode = false; + +// @override +// void initState() { +// super.initState(); +// aboutController = +// TextEditingController(text: DummyStudents.students[0].about); +// skillsController = TextEditingController( +// text: DummyStudents.students[0].skills?.join(", ") ?? ""); +// achievementsController = TextEditingController( +// text: DummyStudents.students[0].achievements +// ?.map((ach) => "${ach.title}: ${ach.description}") +// .join("\n") ?? +// ""); +// } + +// @override +// void dispose() { +// aboutController.dispose(); +// skillsController.dispose(); +// achievementsController.dispose(); +// super.dispose(); +// } + +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// appBar: AppBar( +// title: const Text('User Profile'), +// actions: [ +// IconButton( +// icon: Icon(isEditMode ? Icons.save : Icons.edit), +// onPressed: () { +// setState(() { +// if (isEditMode) { +// // Save changes to the student object +// // DummyStudents.students[0].about = aboutController.text; +// // DummyStudents.students[0].skills = +// // skillsController.text.split(", ").toList(); +// // DummyStudents.students[0].achievements = _parseAchievements(); +// } +// isEditMode = !isEditMode; +// }); +// }, +// ), +// ], +// ), +// body: Container( +// decoration: const BoxDecoration( +// color: Colors.lightBlueAccent, +// ), +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// CircleAvatar( +// backgroundImage: DummyStudents.students[0].profilePicURI != null +// ? NetworkImage(DummyStudents.students[0].profilePicURI!) +// : AssetImage('assets/openlake.png') +// as ImageProvider, +// radius: 55, +// child: DummyStudents.students[0].profilePicURI == null +// ? const Icon( +// Icons.person, +// size: 55, +// color: Colors.grey, +// ) +// : null, +// ), +// const SizedBox(height: 16), +// Card( +// color: Colors.white, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.circular(20.0), +// ), +// elevation: 5, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// DummyStudents.students[0].name, +// style: const TextStyle( +// fontSize: 28, +// fontWeight: FontWeight.bold, +// ), +// ), +// const SizedBox(height: 16), +// buildInfoRow("ID", DummyStudents.students[0].rollNumber), +// buildInfoRow( +// "Email", DummyStudents.students[0].studentMail), +// buildInfoRow("Branch", DummyStudents.students[0].branch), +// buildInfoRow( +// "Class of", +// DummyStudents.students[0].graduationYear ?? "202x", +// ), +// const SizedBox(height: 16), +// _buildEditableField( +// "About", +// aboutController, +// isEditMode, +// ), +// const SizedBox(height: 16), +// _buildEditableField( +// "Roles", +// null, +// isEditMode, +// values: DummyStudents.students[0].roles, +// ), +// const SizedBox(height: 16), +// _buildEditableField( +// "Skills", +// skillsController, +// isEditMode, +// ), +// const SizedBox(height: 16), +// buildAchievementsColumn( +// DummyStudents.students[0].achievements), +// ], +// ), +// ), +// ), +// ], +// ), +// ), +// ), +// ); +// } + +// Widget buildInfoRow(String title, String value) { +// return Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// Text(value), +// ], +// ); +// } + +// Widget _buildEditableField( +// String title, +// TextEditingController? controller, +// bool isEditable, { +// List? values, +// }) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (isEditable) ...[ +// if (controller != null) TextField(controller: controller), +// if (values != null) ...[ +// for (var value in values) Text('- $value'), +// ] +// ] else ...[ +// if (values != null && values.isNotEmpty) +// for (var value in values) Text('- $value'), +// if (values == null || values.isEmpty) const Text('- No Information'), +// ], +// ], +// ); +// } + +// Widget buildAchievementsColumn(List? achievements) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Achievements:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (isEditMode) ...[ +// if (achievementsController != null) +// TextField(controller: achievementsController), +// ] else ...[ +// if (achievements != null) +// for (var achievement in achievements) +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text('- ${achievement.title}'), +// Text(' ${achievement.description}'), +// ], +// ), +// ], +// ], +// ); +// } + +// List? _parseAchievements() { +// final lines = achievementsController.text.split("\n"); +// return lines +// .map((line) { +// final parts = line.split(": "); +// return Achievement(title: parts[0], description: parts[1]); +// }) +// .where((ach) => ach.title.isNotEmpty && ach.description.isNotEmpty) +// .toList(); +// } +// } \ No newline at end of file From 7189397c0803109ed93c3ab771b18dfe6167ba9d Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Thu, 1 Feb 2024 20:32:41 +0530 Subject: [PATCH 03/29] schema update --- frontend/lib/constants/dummy.dart | 2 + frontend/lib/constants/dummy_entries.dart | 173 ++++++++++++++++------ frontend/lib/models/student.dart | 53 +++++-- frontend/lib/models/student2.dart | 2 + frontend/lib/routes/student_provide.dart | 1 + 5 files changed, 178 insertions(+), 53 deletions(-) diff --git a/frontend/lib/constants/dummy.dart b/frontend/lib/constants/dummy.dart index 1889ec6..3eba684 100644 --- a/frontend/lib/constants/dummy.dart +++ b/frontend/lib/constants/dummy.dart @@ -41,6 +41,7 @@ class DummyStudents { Student( id: '1', name: 'John Doe', + collegeId: 'C001', studentMail: 'john.doe@example.com', rollNumber: '12345678', about: 'Hi , i am a CSE Undergrad of IIT BHOPAL.', @@ -64,6 +65,7 @@ class DummyStudents { Student( id: '2', name: 'Talla', + collegeId: 'C001', studentMail: 'talla.doe@example.com', rollNumber: '12345789', about: 'Hi , i am a CSE Undergrad of IIT BHOjpur.', diff --git a/frontend/lib/constants/dummy_entries.dart b/frontend/lib/constants/dummy_entries.dart index 3f3079e..fdf901f 100644 --- a/frontend/lib/constants/dummy_entries.dart +++ b/frontend/lib/constants/dummy_entries.dart @@ -13,7 +13,7 @@ class DummyStudents { studentMail: 'john.doe@example.com', rollNumber: '12345', branch: 'Computer Science', - role: 'Student'), + roles: ['Student']), Student( id: '2', collegeId: 'C002', @@ -21,7 +21,7 @@ class DummyStudents { studentMail: 'alice.johnson@example.com', rollNumber: '67890', branch: 'Mechanical Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '3', collegeId: 'C003', @@ -29,7 +29,7 @@ class DummyStudents { studentMail: 'bob.williams@example.com', rollNumber: '54321', branch: 'Electrical Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '4', collegeId: 'C004', @@ -37,7 +37,7 @@ class DummyStudents { studentMail: 'eva.davis@example.com', rollNumber: '98765', branch: 'Civil Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '5', collegeId: 'C005', @@ -45,7 +45,7 @@ class DummyStudents { studentMail: 'chris.taylor@example.com', rollNumber: '13579', branch: 'Chemical Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '6', collegeId: 'C006', @@ -53,7 +53,7 @@ class DummyStudents { studentMail: 'grace.miller@example.com', rollNumber: '24680', branch: 'Biotechnology', - role: 'Student'), + roles: ['Student']), Student( id: '7', collegeId: 'C007', @@ -61,7 +61,7 @@ class DummyStudents { studentMail: 'daniel.brown@example.com', rollNumber: '97531', branch: 'Aerospace Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '8', collegeId: 'C008', @@ -69,7 +69,7 @@ class DummyStudents { studentMail: 'sophia.wilson@example.com', rollNumber: '86420', branch: 'Information Technology', - role: 'Student'), + roles: ['Student']), Student( id: '9', collegeId: 'C009', @@ -77,7 +77,7 @@ class DummyStudents { studentMail: 'matthew.white@example.com', rollNumber: '12340', branch: 'Mechatronics', - role: 'Student'), + roles: ['Student']), Student( id: '10', collegeId: 'C010', @@ -85,7 +85,7 @@ class DummyStudents { studentMail: 'olivia.harris@example.com', rollNumber: '56789', branch: 'Robotics Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '11', collegeId: 'C011', @@ -93,7 +93,7 @@ class DummyStudents { studentMail: 'william.turner@example.com', rollNumber: '34567', branch: 'Industrial Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '12', collegeId: 'C012', @@ -101,7 +101,7 @@ class DummyStudents { studentMail: 'emma.clark@example.com', rollNumber: '89012', branch: 'Computer Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '13', collegeId: 'C013', @@ -109,7 +109,7 @@ class DummyStudents { studentMail: 'ryan.allen@example.com', rollNumber: '67890', branch: 'Software Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '14', collegeId: 'C014', @@ -117,7 +117,7 @@ class DummyStudents { studentMail: 'ava.young@example.com', rollNumber: '23456', branch: 'Environmental Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '15', collegeId: 'C015', @@ -125,7 +125,7 @@ class DummyStudents { studentMail: 'jackson.walker@example.com', rollNumber: '87654', branch: 'Petroleum Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '16', collegeId: 'C016', @@ -133,7 +133,7 @@ class DummyStudents { studentMail: 'sophie.lee@example.com', rollNumber: '54321', branch: 'Nuclear Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '17', collegeId: 'C017', @@ -141,7 +141,7 @@ class DummyStudents { studentMail: 'david.hall@example.com', rollNumber: '10987', branch: 'Biomedical Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '18', collegeId: 'C018', @@ -149,7 +149,7 @@ class DummyStudents { studentMail: 'isabella.miller@example.com', rollNumber: '87654', branch: 'Chemical Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '19', collegeId: 'C019', @@ -157,7 +157,7 @@ class DummyStudents { studentMail: 'mason.baker@example.com', rollNumber: '54321', branch: 'Electronics Engineering', - role: 'Student'), + roles: ['Student']), Student( id: '20', collegeId: 'C020', @@ -165,7 +165,7 @@ class DummyStudents { studentMail: 'ella.turner@example.com', rollNumber: '98765', branch: 'Computer Science', - role: 'Student'), + roles: ['Student']), ]; } @@ -219,7 +219,12 @@ class DummyCourses { courseCode: 'IT108', courseName: 'Information Technology Essentials', branch: 'Information Technology'), - Course(id: '9', collegeId: 'C009', courseCode: 'MT109', courseName: 'Mechatronics Basics', branch: 'Mechatronics'), + Course( + id: '9', + collegeId: 'C009', + courseCode: 'MT109', + courseName: 'Mechatronics Basics', + branch: 'Mechatronics'), Course( id: '10', collegeId: 'C010', @@ -296,121 +301,201 @@ class DummyFaculties { collegeId: 'C001', name: 'Dr. Smith', facultyMail: 'smith@example.com', - courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]]), + courses: [ + DummyCourses.courses[0], + DummyCourses.courses[5], + DummyCourses.courses[10] + ]), Faculty( id: '2', collegeId: 'C002', name: 'Prof. Johnson', facultyMail: 'johnson@example.com', - courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]]), + courses: [ + DummyCourses.courses[1], + DummyCourses.courses[6], + DummyCourses.courses[11] + ]), Faculty( id: '3', collegeId: 'C003', name: 'Dr. Brown', facultyMail: 'brown@example.com', - courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]]), + courses: [ + DummyCourses.courses[2], + DummyCourses.courses[7], + DummyCourses.courses[12] + ]), Faculty( id: '4', collegeId: 'C004', name: 'Prof. Davis', facultyMail: 'davis@example.com', - courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]]), + courses: [ + DummyCourses.courses[3], + DummyCourses.courses[8], + DummyCourses.courses[13] + ]), Faculty( id: '5', collegeId: 'C005', name: 'Dr. Wilson', facultyMail: 'wilson@example.com', - courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]]), + courses: [ + DummyCourses.courses[4], + DummyCourses.courses[9], + DummyCourses.courses[14] + ]), Faculty( id: '6', collegeId: 'C006', name: 'Prof. Miller', facultyMail: 'miller@example.com', - courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]]), + courses: [ + DummyCourses.courses[0], + DummyCourses.courses[5], + DummyCourses.courses[10] + ]), Faculty( id: '7', collegeId: 'C007', name: 'Dr. Turner', facultyMail: 'turner@example.com', - courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]]), + courses: [ + DummyCourses.courses[1], + DummyCourses.courses[6], + DummyCourses.courses[11] + ]), Faculty( id: '8', collegeId: 'C008', name: 'Prof. Clark', facultyMail: 'clark@example.com', - courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]]), + courses: [ + DummyCourses.courses[2], + DummyCourses.courses[7], + DummyCourses.courses[12] + ]), Faculty( id: '9', collegeId: 'C009', name: 'Dr. Harris', facultyMail: 'harris@example.com', - courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]]), + courses: [ + DummyCourses.courses[3], + DummyCourses.courses[8], + DummyCourses.courses[13] + ]), Faculty( id: '10', collegeId: 'C010', name: 'Prof. Turner', facultyMail: 'turner@example.com', - courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]]), + courses: [ + DummyCourses.courses[4], + DummyCourses.courses[9], + DummyCourses.courses[14] + ]), Faculty( id: '11', collegeId: 'C011', name: 'Dr. White', facultyMail: 'white@example.com', - courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]]), + courses: [ + DummyCourses.courses[0], + DummyCourses.courses[5], + DummyCourses.courses[10] + ]), Faculty( id: '12', collegeId: 'C012', name: 'Prof. Allen', facultyMail: 'allen@example.com', - courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]]), + courses: [ + DummyCourses.courses[1], + DummyCourses.courses[6], + DummyCourses.courses[11] + ]), Faculty( id: '13', collegeId: 'C013', name: 'Dr. Young', facultyMail: 'young@example.com', - courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]]), + courses: [ + DummyCourses.courses[2], + DummyCourses.courses[7], + DummyCourses.courses[12] + ]), Faculty( id: '14', collegeId: 'C014', name: 'Prof. Walker', facultyMail: 'walker@example.com', - courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]]), + courses: [ + DummyCourses.courses[3], + DummyCourses.courses[8], + DummyCourses.courses[13] + ]), Faculty( id: '15', collegeId: 'C015', name: 'Dr. Lee', facultyMail: 'lee@example.com', - courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]]), + courses: [ + DummyCourses.courses[4], + DummyCourses.courses[9], + DummyCourses.courses[14] + ]), Faculty( id: '16', collegeId: 'C016', name: 'Prof. Hall', facultyMail: 'hall@example.com', - courses: [DummyCourses.courses[0], DummyCourses.courses[5], DummyCourses.courses[10]]), + courses: [ + DummyCourses.courses[0], + DummyCourses.courses[5], + DummyCourses.courses[10] + ]), Faculty( id: '17', collegeId: 'C017', name: 'Dr. Miller', facultyMail: 'miller@example.com', - courses: [DummyCourses.courses[1], DummyCourses.courses[6], DummyCourses.courses[11]]), + courses: [ + DummyCourses.courses[1], + DummyCourses.courses[6], + DummyCourses.courses[11] + ]), Faculty( id: '18', collegeId: 'C018', name: 'Prof. Baker', facultyMail: 'baker@example.com', - courses: [DummyCourses.courses[2], DummyCourses.courses[7], DummyCourses.courses[12]]), + courses: [ + DummyCourses.courses[2], + DummyCourses.courses[7], + DummyCourses.courses[12] + ]), Faculty( id: '19', collegeId: 'C019', name: 'Dr. Turner', facultyMail: 'turner@example.com', - courses: [DummyCourses.courses[3], DummyCourses.courses[8], DummyCourses.courses[13]]), + courses: [ + DummyCourses.courses[3], + DummyCourses.courses[8], + DummyCourses.courses[13] + ]), Faculty( id: '20', collegeId: 'C020', name: 'Prof. Smith', facultyMail: 'smith@example.com', - courses: [DummyCourses.courses[4], DummyCourses.courses[9], DummyCourses.courses[14]]), + courses: [ + DummyCourses.courses[4], + DummyCourses.courses[9], + DummyCourses.courses[14] + ]), ]; } @@ -679,7 +764,11 @@ class DummyRooms { Room(id: '16', name: 'Outdoor Sports Arena', vacant: true), Room(id: '17', name: 'Medical Clinic', vacant: false, occupantId: 'S004'), Room(id: '18', name: 'Music Room', vacant: true), - Room(id: '19', name: 'Student Council Office', vacant: false, occupantId: 'T005'), + Room( + id: '19', + name: 'Student Council Office', + vacant: false, + occupantId: 'T005'), Room(id: '20', name: 'Virtual Reality Lab', vacant: true), ]; } diff --git a/frontend/lib/models/student.dart b/frontend/lib/models/student.dart index a388e30..6d54f5f 100644 --- a/frontend/lib/models/student.dart +++ b/frontend/lib/models/student.dart @@ -1,18 +1,49 @@ class Student { - Student( - {required this.name, - required this.studentMail, - required this.rollNumber, - required this.branch, - required this.role, - this.id, - this.collegeId}); + Student({ + required this.id, + required this.name, + required this.studentMail, + required this.rollNumber, + this.about, + this.profilePicURI, + this.graduationYear, + required this.branch, + this.roles, + this.skills, + this.achievements, + required this.collegeId, + }); - final String? id; - final String? collegeId; + final String id; final String name; final String studentMail; final String rollNumber; + String? about; + final String? profilePicURI; + final String? graduationYear; final String branch; - final String role; + final List? roles; + List? skills; + List? achievements; + final String? collegeId; +} + +class Skills { + final String text; + final double proficiency; + + Skills({ + required this.text, + required this.proficiency, + }); +} + +class Achievement { + final String title; + final String description; + + Achievement({ + required this.title, + required this.description, + }); } diff --git a/frontend/lib/models/student2.dart b/frontend/lib/models/student2.dart index 1222ce5..6d54f5f 100644 --- a/frontend/lib/models/student2.dart +++ b/frontend/lib/models/student2.dart @@ -11,6 +11,7 @@ class Student { this.roles, this.skills, this.achievements, + required this.collegeId, }); final String id; @@ -24,6 +25,7 @@ class Student { final List? roles; List? skills; List? achievements; + final String? collegeId; } class Skills { diff --git a/frontend/lib/routes/student_provide.dart b/frontend/lib/routes/student_provide.dart index b7d2f96..094ce6b 100644 --- a/frontend/lib/routes/student_provide.dart +++ b/frontend/lib/routes/student_provide.dart @@ -4,6 +4,7 @@ import '../models/student2.dart'; final studentProvider = Provider((ref) => Student( id: '1', name: 'John Doe', + collegeId: 'C018', studentMail: 'john.doe@example.com', rollNumber: '12345678', about: 'Hi , i am a CSE Undergrad of IIT BHOPAL.', From 802c08cab9ec082a000b8f167a8b5e82e55ac9a6 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Thu, 1 Feb 2024 23:15:58 +0530 Subject: [PATCH 04/29] dummy entries updated --- frontend/lib/constants/dummy_entries.dart | 130 +++++++++++++++++++--- 1 file changed, 114 insertions(+), 16 deletions(-) diff --git a/frontend/lib/constants/dummy_entries.dart b/frontend/lib/constants/dummy_entries.dart index 1b8239a..d4a7702 100644 --- a/frontend/lib/constants/dummy_entries.dart +++ b/frontend/lib/constants/dummy_entries.dart @@ -1,8 +1,11 @@ +import 'package:smart_insti_app/models/skills.dart'; +import 'package:smart_insti_app/models/student.dart'; +import '../models/achievement.dart'; + import '../models/course.dart'; import '../models/faculty.dart'; import '../models/mess_menu.dart'; import '../models/room.dart'; -import '../models/student.dart'; class DummyStudents { static List students = [ @@ -15,9 +18,12 @@ class DummyStudents { profilePicURI: 'https://example.com/john.jpg', branch: 'Computer Science', graduationYear: 2023, - skills: [], - achievements: [], - roles: ['role1', 'role2'], + skills: [DummySkills.skills[1], DummySkills.skills[2]], + achievements: [ + Dummyachievements.achievements[1], + Dummyachievements.achievements[2] + ], + roles: ['Core Member', 'Coordinator'], ), Student( id: '2', @@ -28,9 +34,12 @@ class DummyStudents { profilePicURI: 'https://example.com/john.jpg', branch: 'Computer Science', graduationYear: 2023, - skills: [], - achievements: [], - roles: ['role1', 'role2'], + skills: [DummySkills.skills[1], DummySkills.skills[2]], + achievements: [ + Dummyachievements.achievements[1], + Dummyachievements.achievements[2] + ], + roles: ['Core Member', 'Coordinator'], ), Student( id: '3', @@ -41,9 +50,12 @@ class DummyStudents { profilePicURI: 'https://example.com/john.jpg', branch: 'Computer Science', graduationYear: 2023, - skills: [], - achievements: [], - roles: ['role1', 'role2'], + skills: [DummySkills.skills[1], DummySkills.skills[2]], + achievements: [ + Dummyachievements.achievements[1], + Dummyachievements.achievements[2] + ], + roles: ['Core Member', 'Coordinator'], ), Student( id: '4', @@ -54,9 +66,12 @@ class DummyStudents { profilePicURI: 'https://example.com/john.jpg', branch: 'Computer Science', graduationYear: 2023, - skills: [], - achievements: [], - roles: ['role1', 'role2'], + skills: [DummySkills.skills[1], DummySkills.skills[2]], + achievements: [ + Dummyachievements.achievements[1], + Dummyachievements.achievements[2] + ], + roles: ['Core Member', 'Coordinator'], ), Student( id: '5', @@ -67,13 +82,96 @@ class DummyStudents { profilePicURI: 'https://example.com/john.jpg', branch: 'Computer Science', graduationYear: 2023, - skills: [], - achievements: [], - roles: ['role1', 'role2'], + skills: [DummySkills.skills[1], DummySkills.skills[2]], + achievements: [ + Dummyachievements.achievements[1], + Dummyachievements.achievements[2] + ], + roles: ['Core Member', 'Coordinator'], ), ]; } +class DummySkills { + static List skills = [ + Skill(id: '1', name: 'Flutter', level: 80), + Skill(id: '2', name: 'C++', level: 100), + Skill(id: '3', name: 'javascript', level: 20), + Skill(id: '4', name: 'Nodejs', level: 30), + Skill(id: '5', name: 'Reactjs', level: 40), + Skill(id: '6', name: 'MongoDB', level: 50), + Skill(id: '7', name: 'Graphic Designing', level: 60), + Skill(id: '8', name: 'chess', level: 70), + Skill(id: '9', name: 'cricket', level: 80), + Skill(id: '10', name: 'VScode', level: 100), + Skill(id: '11', name: 'Dart', level: 100), + Skill(id: '12', name: 'Typing', level: 90), + Skill(id: '13', name: 'Drawing', level: 80), + Skill(id: '14', name: 'Painting', level: 70), + Skill(id: '15', name: 'Sketching', level: 60), + Skill(id: '16', name: 'Programming', level: 50), + Skill(id: '17', name: 'Python', level: 40), + Skill(id: '18', name: 'C', level: 30), + Skill(id: '19', name: 'Speaking', level: 20), + Skill(id: '20', name: 'Sleeping', level: 10) + ]; +} + +class Dummyachievements { + static List achievements = [ + Achievement( + id: '1', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '2', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '3', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '4', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '5', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '6', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '7', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '8', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '9', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon'), + Achievement( + id: '10', + name: 'Hackathon Winner', + date: DateTime(2023, 02, 01), + description: 'First place in XYZ Hackathon') + ]; +} + class DummyCourses { static List courses = [ Course( From b7ca0c9f5b320fa5e5b355228a83fe1b1df89dcb Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Thu, 1 Feb 2024 23:22:34 +0530 Subject: [PATCH 05/29] remove the redudant files and updates the imports --- frontend/lib/constants/dummy.dart | 90 ---------------- frontend/lib/models/student2.dart | 49 --------- frontend/lib/routes/routes.dart | 130 ----------------------- frontend/lib/routes/student_provide.dart | 27 ----- frontend/lib/screens/home.dart | 2 +- frontend/lib/screens/user_profile.dart | 4 +- 6 files changed, 3 insertions(+), 299 deletions(-) delete mode 100644 frontend/lib/constants/dummy.dart delete mode 100644 frontend/lib/models/student2.dart delete mode 100644 frontend/lib/routes/routes.dart delete mode 100644 frontend/lib/routes/student_provide.dart diff --git a/frontend/lib/constants/dummy.dart b/frontend/lib/constants/dummy.dart deleted file mode 100644 index 3eba684..0000000 --- a/frontend/lib/constants/dummy.dart +++ /dev/null @@ -1,90 +0,0 @@ -// import '../screens/user_profile.dart'; -import '../models/student2.dart'; - -// class DummyStudents { -// static Student getStudentById(String id) { -// return students.firstWhere( -// (student) => student.id == id, -// orElse: () => Student( -// id: '1', -// name: 'John Doe', -// studentMail: 'john.doe@example.com', -// rollNumber: '12345678', -// about: 'Hi, I am a CSE Undergrad of IIT BHOPAL.', -// profilePicURI: -// 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', -// graduationYear: '2026', -// branch: 'Computer Science', -// roles: ['Openlake Core Member', 'Class Representative'], -// skills: ['Flutter', 'Dart'], -// achievements: [ -// Achievement( -// title: 'Hackathon Winner', -// description: 'First place in XYZ Hackathon', -// ), -// Achievement( -// title: 'Project Showcase', -// description: 'Presented a project at ABC Expo', -// ), -// ], -// ), -// ); -// } - -// static List students = [ -// // Existing students... -// // Add more students with skills and achievements as needed -// ]; -// } -class DummyStudents { - static List students = [ - Student( - id: '1', - name: 'John Doe', - collegeId: 'C001', - studentMail: 'john.doe@example.com', - rollNumber: '12345678', - about: 'Hi , i am a CSE Undergrad of IIT BHOPAL.', - profilePicURI: - 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', - graduationYear: '2026', - branch: 'Computer Science', - roles: ['Openlake Core Member', 'Class Representative'], - skills: ['Flutter', 'Dart'], - achievements: [ - Achievement( - title: 'Hackathon Winner', - description: 'First place in XYZ Hackathon', - ), - Achievement( - title: 'Project Showcase', - description: 'Presented a project at ABC Expo', - ), - ], - ), - Student( - id: '2', - name: 'Talla', - collegeId: 'C001', - studentMail: 'talla.doe@example.com', - rollNumber: '12345789', - about: 'Hi , i am a CSE Undergrad of IIT BHOjpur.', - profilePicURI: - 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', - graduationYear: '2025', - branch: 'Computer Science', - roles: ['Openlake Core Member', 'Class Representative'], - skills: ['Flutter', 'Dart'], - achievements: [ - Achievement( - title: 'Hackathon Winner', - description: 'First place in XYZ Hackathon', - ), - Achievement( - title: 'Project Showcase', - description: 'Presented a project at ABC Expo', - ), - ], - ), - ]; -} diff --git a/frontend/lib/models/student2.dart b/frontend/lib/models/student2.dart deleted file mode 100644 index 6d54f5f..0000000 --- a/frontend/lib/models/student2.dart +++ /dev/null @@ -1,49 +0,0 @@ -class Student { - Student({ - required this.id, - required this.name, - required this.studentMail, - required this.rollNumber, - this.about, - this.profilePicURI, - this.graduationYear, - required this.branch, - this.roles, - this.skills, - this.achievements, - required this.collegeId, - }); - - final String id; - final String name; - final String studentMail; - final String rollNumber; - String? about; - final String? profilePicURI; - final String? graduationYear; - final String branch; - final List? roles; - List? skills; - List? achievements; - final String? collegeId; -} - -class Skills { - final String text; - final double proficiency; - - Skills({ - required this.text, - required this.proficiency, - }); -} - -class Achievement { - final String title; - final String description; - - Achievement({ - required this.title, - required this.description, - }); -} diff --git a/frontend/lib/routes/routes.dart b/frontend/lib/routes/routes.dart deleted file mode 100644 index b9573ad..0000000 --- a/frontend/lib/routes/routes.dart +++ /dev/null @@ -1,130 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; -import 'package:smart_insti_app/screens/admin/add_courses.dart'; -import 'package:smart_insti_app/screens/admin/add_students.dart'; -import 'package:smart_insti_app/screens/admin/admin_home.dart'; -import 'package:smart_insti_app/screens/admin/manage_rooms.dart'; -import 'package:smart_insti_app/screens/admin/view_students.dart'; -import '../screens/admin/add_faculty.dart'; -import '../screens/admin/add_menu.dart'; -import '../screens/admin/view_courses.dart'; -import '../screens/admin/view_faculty.dart'; -import '../screens/admin/view_menu.dart'; -import '../screens/auth/login_page.dart'; -import '../screens/user_profile.dart'; -import '../screens/home.dart'; - -final GoRouter routes = GoRouter( - routes: [ - GoRoute( - path: '/', - pageBuilder: (context, state) => const MaterialPage(child: Home()), - routes: [ - GoRoute( - path: 'user_profile', - pageBuilder: (context, state) => - const MaterialPage(child: UserProfile()), - ), - GoRoute( - path: 'admin_home', - pageBuilder: (context, state) => - const MaterialPage(child: AdminHome()), - routes: [ - GoRoute( - path: 'add_students', - pageBuilder: (context, state) => - MaterialPage(child: AddStudents()), - ), - GoRoute( - path: 'add_faculty', - pageBuilder: (context, state) => - MaterialPage(child: AddFaculty()), - ), - GoRoute( - path: 'add_courses', - pageBuilder: (context, state) => - MaterialPage(child: AddCourses()), - ), - GoRoute( - path: 'view_students', - pageBuilder: (context, state) => - MaterialPage(child: ViewStudents()), - ), - GoRoute( - path: 'view_faculty', - pageBuilder: (context, state) => - MaterialPage(child: ViewFaculty()), - ), - GoRoute( - path: 'view_courses', - pageBuilder: (context, state) => - MaterialPage(child: ViewCourses()), - ), - GoRoute( - path: 'add_menu', - pageBuilder: (context, state) => - MaterialPage(child: AddMessMenu()), - ), - GoRoute( - path: 'view_menu', - pageBuilder: (context, state) => - MaterialPage(child: ViewMessMenu()), - ), - GoRoute( - path: 'manage_rooms', - pageBuilder: (context, state) => - MaterialPage(child: ManageRooms()), - ) - ], - ), - ], - ) - ], -); - -// final GoRouter routes = GoRouter( -// routes: [ -// GoRoute( -// path: '/', -// pageBuilder: (context, state) => const MaterialPage(child: AdminHome()), -// routes: [ -// GoRoute( -// path: 'add_students', -// pageBuilder: (context, state) => MaterialPage(child: AddStudents()), -// ), -// GoRoute( -// path: 'add_faculty', -// pageBuilder: (context, state) => MaterialPage(child: AddFaculty()), -// ), -// GoRoute( -// path: 'add_courses', -// pageBuilder: (context, state) => MaterialPage(child: AddCourses()), -// ), -// GoRoute( -// path: 'view_students', -// pageBuilder: (context, state) => MaterialPage(child: ViewStudents()), -// ), -// GoRoute( -// path: 'view_faculty', -// pageBuilder: (context, state) => MaterialPage(child: ViewFaculty()), -// ), -// GoRoute( -// path: 'view_courses', -// pageBuilder: (context, state) => MaterialPage(child: ViewCourses()), -// ), -// GoRoute( -// path: 'add_menu', -// pageBuilder: (context, state) => MaterialPage(child: AddMessMenu()), -// ), -// GoRoute( -// path: 'view_menu', -// pageBuilder: (context, state) => MaterialPage(child: ViewMessMenu()), -// ), -// GoRoute( -// path: 'manage_rooms', -// pageBuilder: (context, state) => MaterialPage(child: ManageRooms()), -// ) -// ], -// ) -// ], -// ); diff --git a/frontend/lib/routes/student_provide.dart b/frontend/lib/routes/student_provide.dart deleted file mode 100644 index 094ce6b..0000000 --- a/frontend/lib/routes/student_provide.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import '../models/student2.dart'; - -final studentProvider = Provider((ref) => Student( - id: '1', - name: 'John Doe', - collegeId: 'C018', - studentMail: 'john.doe@example.com', - rollNumber: '12345678', - about: 'Hi , i am a CSE Undergrad of IIT BHOPAL.', - profilePicURI: - 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', - graduationYear: '2026', - branch: 'Computer Science', - roles: ['Openlake Core Member', 'Class Representative'], - skills: ['Flutter', 'Dart'], - achievements: [ - Achievement( - title: 'Hackathon Winner', - description: 'First place in XYZ Hackathon', - ), - Achievement( - title: 'Project Showcase', - description: 'Presented a project at ABC Expo', - ), - ], - )); diff --git a/frontend/lib/screens/home.dart b/frontend/lib/screens/home.dart index 3ded539..48a0ae8 100644 --- a/frontend/lib/screens/home.dart +++ b/frontend/lib/screens/home.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../constants/constants.dart'; -import '../routes/student_provide.dart'; +import '../provider/student_provider.dart'; // import '../screens/user_profile.dart'; class Home extends ConsumerWidget { diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 6ae0b8c..09772e2 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; // import '../constants/dummy.dart'; -import '../models/student2.dart'; -import '../routes/student_provide.dart'; +import '../models/student.dart'; +import '../provider/student_provider.dart'; bool isEditMode = false; TextEditingController achievementsController = TextEditingController(); From b7c2e81ba6d6705d66ef2bc0be1bc5bfab39560c Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Thu, 1 Feb 2024 23:28:57 +0530 Subject: [PATCH 06/29] added routes.dart --- frontend/lib/routes/routes.dart | 130 ++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 frontend/lib/routes/routes.dart diff --git a/frontend/lib/routes/routes.dart b/frontend/lib/routes/routes.dart new file mode 100644 index 0000000..b9573ad --- /dev/null +++ b/frontend/lib/routes/routes.dart @@ -0,0 +1,130 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:smart_insti_app/screens/admin/add_courses.dart'; +import 'package:smart_insti_app/screens/admin/add_students.dart'; +import 'package:smart_insti_app/screens/admin/admin_home.dart'; +import 'package:smart_insti_app/screens/admin/manage_rooms.dart'; +import 'package:smart_insti_app/screens/admin/view_students.dart'; +import '../screens/admin/add_faculty.dart'; +import '../screens/admin/add_menu.dart'; +import '../screens/admin/view_courses.dart'; +import '../screens/admin/view_faculty.dart'; +import '../screens/admin/view_menu.dart'; +import '../screens/auth/login_page.dart'; +import '../screens/user_profile.dart'; +import '../screens/home.dart'; + +final GoRouter routes = GoRouter( + routes: [ + GoRoute( + path: '/', + pageBuilder: (context, state) => const MaterialPage(child: Home()), + routes: [ + GoRoute( + path: 'user_profile', + pageBuilder: (context, state) => + const MaterialPage(child: UserProfile()), + ), + GoRoute( + path: 'admin_home', + pageBuilder: (context, state) => + const MaterialPage(child: AdminHome()), + routes: [ + GoRoute( + path: 'add_students', + pageBuilder: (context, state) => + MaterialPage(child: AddStudents()), + ), + GoRoute( + path: 'add_faculty', + pageBuilder: (context, state) => + MaterialPage(child: AddFaculty()), + ), + GoRoute( + path: 'add_courses', + pageBuilder: (context, state) => + MaterialPage(child: AddCourses()), + ), + GoRoute( + path: 'view_students', + pageBuilder: (context, state) => + MaterialPage(child: ViewStudents()), + ), + GoRoute( + path: 'view_faculty', + pageBuilder: (context, state) => + MaterialPage(child: ViewFaculty()), + ), + GoRoute( + path: 'view_courses', + pageBuilder: (context, state) => + MaterialPage(child: ViewCourses()), + ), + GoRoute( + path: 'add_menu', + pageBuilder: (context, state) => + MaterialPage(child: AddMessMenu()), + ), + GoRoute( + path: 'view_menu', + pageBuilder: (context, state) => + MaterialPage(child: ViewMessMenu()), + ), + GoRoute( + path: 'manage_rooms', + pageBuilder: (context, state) => + MaterialPage(child: ManageRooms()), + ) + ], + ), + ], + ) + ], +); + +// final GoRouter routes = GoRouter( +// routes: [ +// GoRoute( +// path: '/', +// pageBuilder: (context, state) => const MaterialPage(child: AdminHome()), +// routes: [ +// GoRoute( +// path: 'add_students', +// pageBuilder: (context, state) => MaterialPage(child: AddStudents()), +// ), +// GoRoute( +// path: 'add_faculty', +// pageBuilder: (context, state) => MaterialPage(child: AddFaculty()), +// ), +// GoRoute( +// path: 'add_courses', +// pageBuilder: (context, state) => MaterialPage(child: AddCourses()), +// ), +// GoRoute( +// path: 'view_students', +// pageBuilder: (context, state) => MaterialPage(child: ViewStudents()), +// ), +// GoRoute( +// path: 'view_faculty', +// pageBuilder: (context, state) => MaterialPage(child: ViewFaculty()), +// ), +// GoRoute( +// path: 'view_courses', +// pageBuilder: (context, state) => MaterialPage(child: ViewCourses()), +// ), +// GoRoute( +// path: 'add_menu', +// pageBuilder: (context, state) => MaterialPage(child: AddMessMenu()), +// ), +// GoRoute( +// path: 'view_menu', +// pageBuilder: (context, state) => MaterialPage(child: ViewMessMenu()), +// ), +// GoRoute( +// path: 'manage_rooms', +// pageBuilder: (context, state) => MaterialPage(child: ManageRooms()), +// ) +// ], +// ) +// ], +// ); From 31d00c7b7346ce6f750be8966c9f9478fe11da77 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Fri, 2 Feb 2024 01:01:43 +0530 Subject: [PATCH 07/29] added the getstudentbyID function --- frontend/lib/constants/dummy_entries.dart | 15 ++++++++----- frontend/lib/provider/student_provider.dart | 24 +++++++++++++++++++++ frontend/lib/screens/home.dart | 20 ++++++++--------- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/frontend/lib/constants/dummy_entries.dart b/frontend/lib/constants/dummy_entries.dart index d4a7702..20755d1 100644 --- a/frontend/lib/constants/dummy_entries.dart +++ b/frontend/lib/constants/dummy_entries.dart @@ -15,7 +15,8 @@ class DummyStudents { email: 'john.doe@example.com', rollNumber: 'R001', about: 'I am a computer science student.', - profilePicURI: 'https://example.com/john.jpg', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', branch: 'Computer Science', graduationYear: 2023, skills: [DummySkills.skills[1], DummySkills.skills[2]], @@ -31,7 +32,8 @@ class DummyStudents { email: 'john.doe@example.com', rollNumber: 'R001', about: 'I am a computer science student.', - profilePicURI: 'https://example.com/john.jpg', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', branch: 'Computer Science', graduationYear: 2023, skills: [DummySkills.skills[1], DummySkills.skills[2]], @@ -47,7 +49,8 @@ class DummyStudents { email: 'john.doe@example.com', rollNumber: 'R001', about: 'I am a computer science student.', - profilePicURI: 'https://example.com/john.jpg', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', branch: 'Computer Science', graduationYear: 2023, skills: [DummySkills.skills[1], DummySkills.skills[2]], @@ -63,7 +66,8 @@ class DummyStudents { email: 'john.doe@example.com', rollNumber: 'R001', about: 'I am a computer science student.', - profilePicURI: 'https://example.com/john.jpg', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', branch: 'Computer Science', graduationYear: 2023, skills: [DummySkills.skills[1], DummySkills.skills[2]], @@ -79,7 +83,8 @@ class DummyStudents { email: 'john.doe@example.com', rollNumber: 'R001', about: 'I am a computer science student.', - profilePicURI: 'https://example.com/john.jpg', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', branch: 'Computer Science', graduationYear: 2023, skills: [DummySkills.skills[1], DummySkills.skills[2]], diff --git a/frontend/lib/provider/student_provider.dart b/frontend/lib/provider/student_provider.dart index 3a336a4..cf5a46e 100644 --- a/frontend/lib/provider/student_provider.dart +++ b/frontend/lib/provider/student_provider.dart @@ -155,4 +155,28 @@ class StudentProvider extends StateNotifier { state = newState; _logger.i("Removed student: ${student.name}"); } + + Student getStudentById(String studentId) { + try { + return state.students.firstWhere((student) => student.id == studentId); + } catch (e) { + return Student( + id: '1', + name: 'John Doe', + email: 'john.doe@example.com', + rollNumber: 'R001', + about: 'I am a computer science student.', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', + branch: 'Computer Science', + graduationYear: 2023, + skills: [DummySkills.skills[1], DummySkills.skills[2]], + achievements: [ + Dummyachievements.achievements[1], + Dummyachievements.achievements[2] + ], + roles: ['Core Member', 'Coordinator'], + ); + } + } } diff --git a/frontend/lib/screens/home.dart b/frontend/lib/screens/home.dart index 48a0ae8..fb27441 100644 --- a/frontend/lib/screens/home.dart +++ b/frontend/lib/screens/home.dart @@ -34,19 +34,19 @@ class Home extends ConsumerWidget { ), ], ), - body: Padding( - padding: const EdgeInsets.all(16.0), + body: const Padding( + padding: EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 16), - Text( - 'Welcome, ${student.name}!', - style: - const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), - ), - const SizedBox(height: 16), - const Text('Tap the icon to view your profile.'), + // const SizedBox(height: 16), + // Text( + // 'Welcome, ${student.name}!', + // style: + // const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + // ), + SizedBox(height: 16), + Text('Tap the icon to view your profile.'), ], ), ), From 996e3b2da91b7d75347771fedb752ce2d57745b8 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Sun, 4 Feb 2024 01:51:51 +0530 Subject: [PATCH 08/29] added separate widgets for editable entities --- frontend/lib/provider/about_Edit_widget.dart | 37 + .../provider/achievements_edit_widget.dart | 77 +++ frontend/lib/provider/skills_edit_widget.dart | 31 + frontend/lib/provider/student_provider.dart | 33 +- frontend/lib/screens/user_profile.dart | 644 +++++++++++++++--- frontend/pubspec.lock | 44 +- frontend/pubspec.yaml | 1 + 7 files changed, 767 insertions(+), 100 deletions(-) create mode 100644 frontend/lib/provider/about_Edit_widget.dart create mode 100644 frontend/lib/provider/achievements_edit_widget.dart create mode 100644 frontend/lib/provider/skills_edit_widget.dart diff --git a/frontend/lib/provider/about_Edit_widget.dart b/frontend/lib/provider/about_Edit_widget.dart new file mode 100644 index 0000000..00bfb5a --- /dev/null +++ b/frontend/lib/provider/about_Edit_widget.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import '../provider/student_provider.dart'; + +class AboutEditorWidget extends ConsumerWidget { + const AboutEditorWidget({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final student = ref.read(studentProvider); + + final TextEditingController aboutController = + TextEditingController(text: student.about); + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'About', + style: const TextStyle( + fontWeight: FontWeight.bold, + ), + ), + TextField( + controller: aboutController, + onChanged: (newAbout) { + ref.read(studentProvider.notifier).editAbout(newAbout); + }, + decoration: const InputDecoration( + hintText: 'Write something about yourself...', + ), + maxLines: 5, + ), + ], + ); + } +} diff --git a/frontend/lib/provider/achievements_edit_widget.dart b/frontend/lib/provider/achievements_edit_widget.dart new file mode 100644 index 0000000..8b2fb93 --- /dev/null +++ b/frontend/lib/provider/achievements_edit_widget.dart @@ -0,0 +1,77 @@ +import 'package:flutter/material.dart'; +import 'package:calendar_date_picker2/calendar_date_picker2.dart'; + +class AchievementsEditWidget extends StatelessWidget { + final TextEditingController achievementsController; + List _selectedDate; + + AchievementsEditWidget({ + required this.achievementsController, + Key? key, + }) : _selectedDate = [DateTime.now()], // Initialize _selectedDate + super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Achievements', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + TextFormField( + controller: achievementsController, + decoration: const InputDecoration(labelText: 'Achievement'), + ), + CalendarDatePicker2( + config: CalendarDatePicker2Config(), + value: _selectedDate, + onValueChanged: (dates) { + if (dates != null && dates.isNotEmpty) { + _selectedDate = [dates.first]; + } + }, + ), + ], + ); + } +} +// class AchievementsEditWidget extends StatelessWidget { +// final TextEditingController achievementsController; +// final DateTime? _selectedDate; + +// AchievementsEditWidget({required this.achievementsController}) +// : _selectedDate = DateTime.now(); // Initialize _selectedDate + +// @override +// Widget build(BuildContext context) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Achievements', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// TextFormField( +// controller: achievementsController, +// decoration: const InputDecoration(labelText: 'Achievement'), +// ), +// // Add more fields like description, date picker, etc. +// CalendarDatePicker2( +// config: CalendarDatePicker2Config(), +// value: _selectedDate, +// onValueChanged: (dates) { +// if (dates != null && dates.isNotEmpty) { +// _selectedDate = dates.first; +// } +// }, +// ), +// ], +// ); +// } +// } diff --git a/frontend/lib/provider/skills_edit_widget.dart b/frontend/lib/provider/skills_edit_widget.dart new file mode 100644 index 0000000..a2ba580 --- /dev/null +++ b/frontend/lib/provider/skills_edit_widget.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:syncfusion_flutter_sliders/sliders.dart'; + +class SkillsEditWidget extends StatelessWidget { + final TextEditingController skillsController; + + SkillsEditWidget({required this.skillsController}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Skills', + style: const TextStyle( + fontWeight: FontWeight.bold, + ), + ), + SfSlider( + min: 0.0, + max: 100.0, + value: double.parse(skillsController.text), + onChanged: (dynamic value) { + skillsController.text = value.toStringAsFixed(0); + }, + ), + ], + ); + } +} diff --git a/frontend/lib/provider/student_provider.dart b/frontend/lib/provider/student_provider.dart index cf5a46e..c246b8a 100644 --- a/frontend/lib/provider/student_provider.dart +++ b/frontend/lib/provider/student_provider.dart @@ -6,6 +6,8 @@ import 'package:smart_insti_app/constants/constants.dart'; import 'package:smart_insti_app/constants/dummy_entries.dart'; import '../models/student.dart'; import 'dart:io'; +import '../models/achievement.dart'; +import '../models/skills.dart'; final studentProvider = StateNotifierProvider( (ref) => StudentProvider()); @@ -18,7 +20,12 @@ class StudentState { final TextEditingController studentRollNoController; final TextEditingController searchStudentController; final String branch; - final String role; + final String? role; + final String? profilePicURI; + final String? about; + final int? graduationYear; + final List? skills; + final List? achievements; StudentState({ required this.students, @@ -29,6 +36,11 @@ class StudentState { required this.searchStudentController, required this.branch, required this.role, + this.profilePicURI, + this.about, + this.achievements, + this.graduationYear, + this.skills, }); StudentState copyWith({ @@ -40,6 +52,10 @@ class StudentState { TextEditingController? searchStudentController, String? branch, String? role, + String? about, + String? profilePicURI, + List? skills, + List? achievements, }) { return StudentState( students: students ?? this.students, @@ -123,6 +139,21 @@ class StudentProvider extends StateNotifier { state = newState; } + void editAbout(String newAbout) { + final newState = state.copyWith(about: newAbout); + state = newState; + } + + void editSkills(List newSkills) { + final newState = state.copyWith(skills: newSkills); + state = newState; + } + + void editAchievements(List newAchievements) { + final newState = state.copyWith(achievements: newAchievements); + state = newState; + } + void addStudent() { final newState = state.copyWith( students: [ diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 09772e2..505bc17 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -1,49 +1,28 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../constants/dummy.dart'; - -import '../models/student.dart'; import '../provider/student_provider.dart'; - -bool isEditMode = false; -TextEditingController achievementsController = TextEditingController(); +import '../models/achievement.dart'; +import '../provider/achievements_edit_widget.dart'; +import '../provider/skills_edit_widget.dart'; +import '../provider/about_Edit_widget.dart'; class UserProfile extends ConsumerWidget { - const UserProfile({super.key}); + const UserProfile({Key? key}) : super(key: key); + @override Widget build(BuildContext context, WidgetRef ref) { final student = ref.read(studentProvider); + final TextEditingController aboutController = TextEditingController(text: student.about); final TextEditingController skillsController = - TextEditingController(text: student.skills?.join(", ") ?? ""); - // final TextEditingController achievementController = TextEditingController(); - // final TextEditingController achievementsController = TextEditingController( - // text: student.achievements?.map((ach) => "${ach.title}: ${ach.description}").join("\n") ?? ""); - - // bool isEditMode = false; + TextEditingController(text: student.skills?.toString() ?? ""); + final TextEditingController achievementsController = + TextEditingController(text: student.achievements?.toString() ?? ""); return Scaffold( appBar: AppBar( title: const Text('User Profile'), - actions: [ - IconButton( - icon: Icon(isEditMode ? Icons.save : Icons.edit), - onPressed: () { - ref.refresh(studentProvider); - - // setState(() { - // if (isEditMode) { - // // Save changes to the student object - // // student.about = aboutController.text; - // // student.skills = skillsController.text.split(", ").toList(); - // // student.achievements = _parseAchievements(); - // } - // isEditMode = !isEditMode; - // }); - }, - ), - ], ), body: Container( decoration: const BoxDecoration( @@ -54,20 +33,22 @@ class UserProfile extends ConsumerWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - CircleAvatar( - backgroundImage: student.profilePicURI != null - ? NetworkImage(student.profilePicURI!) - : const AssetImage('assets/openlake.png') - as ImageProvider, - radius: 55, - child: student.profilePicURI == null - ? const Icon( - Icons.person, - size: 55, - color: Colors.grey, - ) - : null, - ), + Consumer(builder: (context, ref, child) { + return CircleAvatar( + backgroundImage: student.profilePicURI != null + ? NetworkImage(student.profilePicURI!) + : const AssetImage('assets/openlake.png') + as ImageProvider, + radius: 55, + child: student.profilePicURI == null + ? const Icon( + Icons.person, + size: 55, + color: Colors.grey, + ) + : null, + ); + }), const SizedBox(height: 16), Card( color: Colors.white, @@ -81,37 +62,29 @@ class UserProfile extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - student.name, + student.studentNameController.text, style: const TextStyle( fontSize: 28, fontWeight: FontWeight.bold, ), ), const SizedBox(height: 16), - buildInfoRow("ID", student.rollNumber), - buildInfoRow("Email", student.studentMail), - buildInfoRow("Branch", student.branch), + buildInfoRow("ID", student.studentRollNoController.text), buildInfoRow( - "Class of", student.graduationYear ?? "202x"), + "Email", student.studentEmailController.text), + buildInfoRow("Branch", student.branch), + // buildInfoRow( + // "Class of", student.graduationYear ?? "202x"), const SizedBox(height: 16), - _buildEditableField( - "About", - aboutController, - isEditMode, - ), + AboutEditorWidget(), + // _buildInfoField("About", aboutController), const SizedBox(height: 16), - _buildEditableField( - "Roles", - null, - isEditMode, - values: student.roles, - ), + _buildInfoField("Roles", values: student.role), const SizedBox(height: 16), - _buildEditableField( - "Skills", - skillsController, - isEditMode, - ), + SkillsEditWidget(skillsController: skillsController), + const SizedBox(height: 16), + AchievementsEditWidget( + achievementsController: achievementsController), const SizedBox(height: 16), buildAchievementsColumn(student.achievements), ], @@ -140,10 +113,9 @@ class UserProfile extends ConsumerWidget { ); } - Widget _buildEditableField( - String title, + Widget _buildInfoField( + String title, { TextEditingController? controller, - bool isEditable, { List? values, }) { return Column( @@ -155,11 +127,8 @@ class UserProfile extends ConsumerWidget { fontWeight: FontWeight.bold, ), ), - if (isEditable) ...[ - if (controller != null) TextField(controller: controller), - if (values != null) ...[ - for (var value in values) Text('- $value'), - ] + if (controller != null) ...[ + TextField(controller: controller, enabled: false), ] else ...[ if (values != null && values.isNotEmpty) for (var value in values) Text('- $value'), @@ -179,23 +148,520 @@ class UserProfile extends ConsumerWidget { fontWeight: FontWeight.bold, ), ), - if (isEditMode) ...[ - if (achievementsController != null) - TextField(controller: achievementsController), - ] else ...[ - if (achievements != null) - for (var achievement in achievements) - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('- ${achievement.title}'), - Text(' ${achievement.description}'), - ], - ), - ], + if (achievements != null) + for (var achievement in achievements) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('- ${achievement.name}'), + Text(' ${achievement.description}'), + ], + ), ], ); } +} +// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../provider/student_provider.dart'; +// import '../models/achievement.dart'; + +// class UserProfile extends ConsumerWidget { +// const UserProfile({Key? key}) : super(key: key); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final student = ref.read(studentProvider); + +// return Scaffold( +// appBar: AppBar( +// title: const Text('User Profile'), +// ), +// body: Container( +// decoration: const BoxDecoration( +// color: Colors.lightBlueAccent, +// ), +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// ConsumerWidget(builder: (_, ref, __) { +// return CircleAvatar( +// backgroundImage: student.profilePicURI != null +// ? NetworkImage(student.profilePicURI!) +// : const AssetImage('assets/openlake.png') +// as ImageProvider, +// radius: 55, +// child: student.profilePicURI == null +// ? const Icon( +// Icons.person, +// size: 55, +// color: Colors.grey, +// ) +// : null, +// ); +// }), +// const SizedBox(height: 16), +// Card( +// color: Colors.white, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.circular(20.0), +// ), +// elevation: 5, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// student.studentNameController.text, +// style: const TextStyle( +// fontSize: 28, +// fontWeight: FontWeight.bold, +// ), +// ), +// const SizedBox(height: 16), +// buildInfoRow("ID", student.studentRollNoController.text), +// buildInfoRow("Email", student.studentEmailController.text), +// buildInfoRow("Branch", student.branch), +// buildInfoRow( +// "Class of", student.graduationYear ?? "202x"), +// const SizedBox(height: 16), +// _buildInfoField("About", aboutController), +// const SizedBox(height: 16), +// _buildInfoField("Roles", values: student.role), +// const SizedBox(height: 16), +// _buildInfoField("Skills", skillsController), +// const SizedBox(height: 16), +// buildAchievementsColumn(student.achievements), +// ], +// ), +// ), +// ), +// ], +// ), +// ), +// ), +// ); +// } + +// Widget buildInfoRow(String title, String value) { +// return Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// Text(value), +// ], +// ); +// } + +// Widget _buildInfoField( +// String title, { +// TextEditingController? controller, +// List? values, +// }) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (controller != null) ...[ +// TextField(controller: controller, enabled: false), +// ] else ...[ +// if (values != null && values.isNotEmpty) +// for (var value in values) Text('- $value'), +// if (values == null || values.isEmpty) const Text('- No Information'), +// ], +// ], +// ); +// } + +// Widget buildAchievementsColumn(List? achievements) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Achievements:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (achievements != null) +// for (var achievement in achievements) +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text('- ${achievement.title}'), +// Text(' ${achievement.description}'), +// ], +// ), +// ], +// ); +// } +// } +// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// // import '../models/student.dart'; +// import '../provider/student_provider.dart'; +// import '../models/achievement.dart'; +// // import '../models/skills.dart'; + +// class UserProfile extends ConsumerWidget { +// const UserProfile({Key? key}) : super(key: key); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final student = ref.watch(studentProvider.notifier); + +// final TextEditingController aboutController = +// TextEditingController(text: student.about); +// final TextEditingController skillsController = +// TextEditingController(text: student.skills?.join(", ") ?? ""); + +// return Scaffold( +// appBar: AppBar( +// title: const Text('User Profile'), +// ), +// body: Container( +// decoration: const BoxDecoration( +// color: Colors.lightBlueAccent, +// ), +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// CircleAvatar( +// backgroundImage: student.profilePicURI != null +// ? NetworkImage(student.profilePicURI!) +// : const AssetImage('assets/openlake.png') +// as ImageProvider, +// radius: 55, +// child: student.profilePicURI == null +// ? const Icon( +// Icons.person, +// size: 55, +// color: Colors.grey, +// ) +// : null, +// ), +// const SizedBox(height: 16), +// Card( +// color: Colors.white, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.circular(20.0), +// ), +// elevation: 5, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// student.name, +// style: const TextStyle( +// fontSize: 28, +// fontWeight: FontWeight.bold, +// ), +// ), +// const SizedBox(height: 16), +// buildInfoRow("ID", student.rollNumber), +// buildInfoRow("Email", student.email), +// buildInfoRow("Branch", student.branch), +// buildInfoRow( +// "Class of", student.graduationYear ?? "202x"), +// const SizedBox(height: 16), +// _buildInfoField("About", aboutController), +// const SizedBox(height: 16), +// _buildInfoField("Roles", values: student.roles), +// const SizedBox(height: 16), +// _buildInfoField("Skills", skillsController), +// const SizedBox(height: 16), +// buildAchievementsColumn(student.achievements), +// ], +// ), +// ), +// ), +// ], +// ), +// ), +// ), +// ); +// } + +// Widget buildInfoRow(String title, String value) { +// return Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// Text(value), +// ], +// ); +// } + +// Widget _buildInfoField( +// String title, { +// TextEditingController? controller, +// List? values, +// }) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (controller != null) ...[ +// TextField(controller: controller, enabled: false), +// ] else ...[ +// if (values != null && values.isNotEmpty) +// for (var value in values) Text('- $value'), +// if (values == null || values.isEmpty) const Text('- No Information'), +// ], +// ], +// ); +// } + +// Widget buildAchievementsColumn(List? achievements) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Achievements:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (achievements != null) +// for (var achievement in achievements) +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text('- ${achievement.title}'), +// Text(' ${achievement.description}'), +// ], +// ), +// ], +// ); +// } +// } + + +// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// // import '../constants/dummy.dart'; + +// import '../models/student.dart'; +// import '../provider/student_provider.dart'; + +// bool isEditMode = false; +// TextEditingController achievementsController = TextEditingController(); + +// class UserProfile extends ConsumerWidget { +// const UserProfile({super.key}); +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final student = ref.read(studentProvider); +// final TextEditingController aboutController = +// TextEditingController(text: student.about); +// final TextEditingController skillsController = +// TextEditingController(text: student.skills?.join(", ") ?? ""); +// // final TextEditingController achievementController = TextEditingController(); +// // final TextEditingController achievementsController = TextEditingController( +// // text: student.achievements?.map((ach) => "${ach.title}: ${ach.description}").join("\n") ?? ""); + +// // bool isEditMode = false; + +// return Scaffold( +// appBar: AppBar( +// title: const Text('User Profile'), +// actions: [ +// IconButton( +// icon: Icon(isEditMode ? Icons.save : Icons.edit), +// onPressed: () { +// ref.refresh(studentProvider); + +// // setState(() { +// // if (isEditMode) { +// // // Save changes to the student object +// // // student.about = aboutController.text; +// // // student.skills = skillsController.text.split(", ").toList(); +// // // student.achievements = _parseAchievements(); +// // } +// // isEditMode = !isEditMode; +// // }); +// }, +// ), +// ], +// ), +// body: Container( +// decoration: const BoxDecoration( +// color: Colors.lightBlueAccent, +// ), +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// CircleAvatar( +// backgroundImage: student.profilePicURI != null +// ? NetworkImage(student.profilePicURI!) +// : const AssetImage('assets/openlake.png') +// as ImageProvider, +// radius: 55, +// child: student.profilePicURI == null +// ? const Icon( +// Icons.person, +// size: 55, +// color: Colors.grey, +// ) +// : null, +// ), +// const SizedBox(height: 16), +// Card( +// color: Colors.white, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.circular(20.0), +// ), +// elevation: 5, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// student.name, +// style: const TextStyle( +// fontSize: 28, +// fontWeight: FontWeight.bold, +// ), +// ), +// const SizedBox(height: 16), +// buildInfoRow("ID", student.rollNumber), +// buildInfoRow("Email", student.studentMail), +// buildInfoRow("Branch", student.branch), +// buildInfoRow( +// "Class of", student.graduationYear ?? "202x"), +// const SizedBox(height: 16), +// _buildEditableField( +// "About", +// aboutController, +// isEditMode, +// ), +// const SizedBox(height: 16), +// _buildEditableField( +// "Roles", +// null, +// isEditMode, +// values: student.roles, +// ), +// const SizedBox(height: 16), +// _buildEditableField( +// "Skills", +// skillsController, +// isEditMode, +// ), +// const SizedBox(height: 16), +// buildAchievementsColumn(student.achievements), +// ], +// ), +// ), +// ), +// ], +// ), +// ), +// ), +// ); +// } + +// Widget buildInfoRow(String title, String value) { +// return Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// Text(value), +// ], +// ); +// } + +// Widget _buildEditableField( +// String title, +// TextEditingController? controller, +// bool isEditable, { +// List? values, +// }) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (isEditable) ...[ +// if (controller != null) TextField(controller: controller), +// if (values != null) ...[ +// for (var value in values) Text('- $value'), +// ] +// ] else ...[ +// if (values != null && values.isNotEmpty) +// for (var value in values) Text('- $value'), +// if (values == null || values.isEmpty) const Text('- No Information'), +// ], +// ], +// ); +// } + +// Widget buildAchievementsColumn(List? achievements) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Achievements:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (isEditMode) ...[ +// if (achievementsController != null) +// TextField(controller: achievementsController), +// ] else ...[ +// if (achievements != null) +// for (var achievement in achievements) +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text('- ${achievement.title}'), +// Text(' ${achievement.description}'), +// ], +// ), +// ], +// ], +// ); +// } // List? _parseAchievements() { // final lines = achievementsController.text.split("\n"); @@ -207,7 +673,7 @@ class UserProfile extends ConsumerWidget { // .where((ach) => ach.title.isNotEmpty && ach.description.isNotEmpty) // .toList(); // } -} +// } // import 'package:flutter/material.dart'; // import '../constants/dummy.dart'; // import '../models/student.dart'; diff --git a/frontend/pubspec.lock b/frontend/pubspec.lock index ae170d8..ead7f6b 100644 --- a/frontend/pubspec.lock +++ b/frontend/pubspec.lock @@ -194,10 +194,10 @@ packages: dependency: transitive description: name: flutter_animate - sha256: "2f3535790fff1ad21bca4f16b7435fa4af6a3c4b43e88e273a8683ed4ec26b26" + sha256: "7c8a6594a9252dad30cc2ef16e33270b6248c4dedc3b3d06c86c4f3f4dc05ae5" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.5.0" flutter_keyboard_visibility: dependency: transitive description: @@ -266,10 +266,10 @@ packages: dependency: "direct main" description: name: flutter_riverpod - sha256: da9591d1f8d5881628ccd5c25c40e74fc3eef50ba45e40c3905a06e1712412d5 + sha256: "4bce556b7ecbfea26109638d5237684538d4abc509d253e6c5c4c5733b360098" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.10" flutter_secure_storage: dependency: "direct main" description: @@ -318,6 +318,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.0" + flutter_shaders: + dependency: transitive + description: + name: flutter_shaders + sha256: "02750b545c01ff4d8e9bbe8f27a7731aa3778402506c67daa1de7f5fc3f4befe" + url: "https://pub.dev" + source: hosted + version: "0.1.2" flutter_svg: dependency: transitive description: @@ -335,10 +343,10 @@ packages: dependency: "direct main" description: name: flutter_typeahead - sha256: ef2dd5a505d2d95a5b4c571c81ad2d6e7955f583dddec49064fec57acffd7a96 + sha256: e2070dea278f09ae30885872138ccae75292b33b7af2c241fec5ceafd980c374 url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "5.1.0" flutter_web_plugins: dependency: transitive description: flutter @@ -356,10 +364,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "3b40e751eaaa855179b416974d59d29669e750d2e50fcdb2b37f1cb0ca8c803a" + sha256: "07ee2436909f749d606f53521dc1725dd738dc5196e5ff815bc254253c594075" url: "https://pub.dev" source: hosted - version: "13.0.1" + version: "13.1.0" google_fonts: dependency: "direct main" description: @@ -636,10 +644,10 @@ packages: dependency: transitive description: name: riverpod - sha256: "942999ee48b899f8a46a860f1e13cee36f2f77609eb54c5b7a669bb20d550b11" + sha256: "548e2192eb7aeb826eb89387f814edb76594f3363e2c0bb99dd733d795ba3589" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.5.0" search_choices: dependency: "direct main" description: @@ -717,6 +725,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + syncfusion_flutter_core: + dependency: transitive + description: + name: syncfusion_flutter_core + sha256: c0693d88cbdef2af5da286c605e5e8f33216c8f6cb3bc92a88a51decfb62bace + url: "https://pub.dev" + source: hosted + version: "24.2.3" + syncfusion_flutter_sliders: + dependency: "direct main" + description: + name: syncfusion_flutter_sliders + sha256: "6b6acf31dea51efdf1a5d204b3b3c1de4d2dd63895fd646206d4a66663f46c04" + url: "https://pub.dev" + source: hosted + version: "24.2.3" term_glyph: dependency: transitive description: diff --git a/frontend/pubspec.yaml b/frontend/pubspec.yaml index 2f3238c..74e8d8d 100644 --- a/frontend/pubspec.yaml +++ b/frontend/pubspec.yaml @@ -51,6 +51,7 @@ dependencies: slide_switcher: ^1.1.2 awesome_snackbar_content: ^0.1.1 delightful_toast: ^1.1.0 + syncfusion_flutter_sliders: ^24.2.3 dev_dependencies: flutter_test: From 7115555479df89141c55faeef1973c08446ab0d9 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Sun, 4 Feb 2024 02:00:35 +0530 Subject: [PATCH 09/29] roles commented --- frontend/lib/screens/user_profile.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 505bc17..42c449c 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -78,8 +78,8 @@ class UserProfile extends ConsumerWidget { const SizedBox(height: 16), AboutEditorWidget(), // _buildInfoField("About", aboutController), - const SizedBox(height: 16), - _buildInfoField("Roles", values: student.role), + // const SizedBox(height: 16), + // _buildInfoField("Roles", values: student.role), const SizedBox(height: 16), SkillsEditWidget(skillsController: skillsController), const SizedBox(height: 16), From df45c70af3d2b9feb08eb1a8bc8e5359f739bd95 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Sun, 4 Feb 2024 02:36:59 +0530 Subject: [PATCH 10/29] edit functionality --- frontend/lib/screens/user_profile.dart | 133 +++++++++++++------------ 1 file changed, 68 insertions(+), 65 deletions(-) diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 42c449c..4a85938 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -24,74 +24,77 @@ class UserProfile extends ConsumerWidget { appBar: AppBar( title: const Text('User Profile'), ), - body: Container( - decoration: const BoxDecoration( - color: Colors.lightBlueAccent, - ), - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Consumer(builder: (context, ref, child) { - return CircleAvatar( - backgroundImage: student.profilePicURI != null - ? NetworkImage(student.profilePicURI!) - : const AssetImage('assets/openlake.png') - as ImageProvider, - radius: 55, - child: student.profilePicURI == null - ? const Icon( - Icons.person, - size: 55, - color: Colors.grey, - ) - : null, - ); - }), - const SizedBox(height: 16), - Card( - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20.0), - ), - elevation: 5, - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - student.studentNameController.text, - style: const TextStyle( - fontSize: 28, - fontWeight: FontWeight.bold, + body: SingleChildScrollView( + child: Container( + decoration: const BoxDecoration( + color: Colors.lightBlueAccent, + ), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Consumer(builder: (context, ref, child) { + return CircleAvatar( + backgroundImage: student.profilePicURI != null + ? NetworkImage(student.profilePicURI!) + : const AssetImage('assets/openlake.png') + as ImageProvider, + radius: 55, + child: student.profilePicURI == null + ? const Icon( + Icons.person, + size: 55, + color: Colors.grey, + ) + : null, + ); + }), + const SizedBox(height: 16), + Card( + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.0), + ), + elevation: 5, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + student.studentNameController.text, + style: const TextStyle( + fontSize: 28, + fontWeight: FontWeight.bold, + ), ), - ), - const SizedBox(height: 16), - buildInfoRow("ID", student.studentRollNoController.text), - buildInfoRow( - "Email", student.studentEmailController.text), - buildInfoRow("Branch", student.branch), - // buildInfoRow( - // "Class of", student.graduationYear ?? "202x"), - const SizedBox(height: 16), - AboutEditorWidget(), - // _buildInfoField("About", aboutController), - // const SizedBox(height: 16), - // _buildInfoField("Roles", values: student.role), - const SizedBox(height: 16), - SkillsEditWidget(skillsController: skillsController), - const SizedBox(height: 16), - AchievementsEditWidget( - achievementsController: achievementsController), - const SizedBox(height: 16), - buildAchievementsColumn(student.achievements), - ], + const SizedBox(height: 16), + buildInfoRow( + "ID", student.studentRollNoController.text), + buildInfoRow( + "Email", student.studentEmailController.text), + buildInfoRow("Branch", student.branch), + // buildInfoRow( + // "Class of", student.graduationYear ?? "202x"), + const SizedBox(height: 16), + AboutEditorWidget(), + // _buildInfoField("About", aboutController), + // const SizedBox(height: 16), + // _buildInfoField("Roles", values: student.role), + const SizedBox(height: 16), + SkillsEditWidget(skillsController: skillsController), + const SizedBox(height: 16), + AchievementsEditWidget( + achievementsController: achievementsController), + const SizedBox(height: 16), + buildAchievementsColumn(student.achievements), + ], + ), ), ), - ), - ], + ], + ), ), ), ), From 63f54027e532b641f93b7a8109c88e362faed2d5 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Sun, 4 Feb 2024 19:55:41 +0530 Subject: [PATCH 11/29] pie chart lib added, edit profile, user profile edited --- .../provider/achievements_edit_widget.dart | 38 +- frontend/lib/provider/skills_edit_widget.dart | 6 +- frontend/lib/provider/user_providers.dart | 9 + frontend/lib/screens/edit_profile.dart | 61 +++ frontend/lib/screens/user_profile.dart | 494 ++++++++++++++---- frontend/pubspec.lock | 16 + frontend/pubspec.yaml | 1 + 7 files changed, 493 insertions(+), 132 deletions(-) create mode 100644 frontend/lib/provider/user_providers.dart create mode 100644 frontend/lib/screens/edit_profile.dart diff --git a/frontend/lib/provider/achievements_edit_widget.dart b/frontend/lib/provider/achievements_edit_widget.dart index 8b2fb93..90f6cee 100644 --- a/frontend/lib/provider/achievements_edit_widget.dart +++ b/frontend/lib/provider/achievements_edit_widget.dart @@ -8,7 +8,7 @@ class AchievementsEditWidget extends StatelessWidget { AchievementsEditWidget({ required this.achievementsController, Key? key, - }) : _selectedDate = [DateTime.now()], // Initialize _selectedDate + }) : _selectedDate = [DateTime.now()], super(key: key); @override @@ -39,39 +39,3 @@ class AchievementsEditWidget extends StatelessWidget { ); } } -// class AchievementsEditWidget extends StatelessWidget { -// final TextEditingController achievementsController; -// final DateTime? _selectedDate; - -// AchievementsEditWidget({required this.achievementsController}) -// : _selectedDate = DateTime.now(); // Initialize _selectedDate - -// @override -// Widget build(BuildContext context) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Achievements', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// TextFormField( -// controller: achievementsController, -// decoration: const InputDecoration(labelText: 'Achievement'), -// ), -// // Add more fields like description, date picker, etc. -// CalendarDatePicker2( -// config: CalendarDatePicker2Config(), -// value: _selectedDate, -// onValueChanged: (dates) { -// if (dates != null && dates.isNotEmpty) { -// _selectedDate = dates.first; -// } -// }, -// ), -// ], -// ); -// } -// } diff --git a/frontend/lib/provider/skills_edit_widget.dart b/frontend/lib/provider/skills_edit_widget.dart index a2ba580..f1d1279 100644 --- a/frontend/lib/provider/skills_edit_widget.dart +++ b/frontend/lib/provider/skills_edit_widget.dart @@ -4,16 +4,16 @@ import 'package:syncfusion_flutter_sliders/sliders.dart'; class SkillsEditWidget extends StatelessWidget { final TextEditingController skillsController; - SkillsEditWidget({required this.skillsController}); + const SkillsEditWidget({required this.skillsController}); @override Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + const Text( 'Skills', - style: const TextStyle( + style: TextStyle( fontWeight: FontWeight.bold, ), ), diff --git a/frontend/lib/provider/user_providers.dart b/frontend/lib/provider/user_providers.dart new file mode 100644 index 0000000..502e139 --- /dev/null +++ b/frontend/lib/provider/user_providers.dart @@ -0,0 +1,9 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import '../constants/dummy_entries.dart'; +import '../models/skills.dart'; +import '../models/achievement.dart'; + +final aboutProvider = StateProvider((ref) => null); +final skillsProvider = StateProvider>((ref) => DummySkills.skills); +final achievementsProvider = + StateProvider>((ref) => Dummyachievements.achievements); diff --git a/frontend/lib/screens/edit_profile.dart b/frontend/lib/screens/edit_profile.dart new file mode 100644 index 0000000..c65af64 --- /dev/null +++ b/frontend/lib/screens/edit_profile.dart @@ -0,0 +1,61 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import '../provider/user_providers.dart'; +import '../models/skills.dart'; +import '../models/achievement.dart'; +import '../provider/skills_edit_widget.dart'; +import '../provider/achievements_edit_widget.dart'; + +class EditProfileScreen extends ConsumerWidget { + @override + Widget build(BuildContext context, WidgetRef ref) { + TextEditingController aboutController = + TextEditingController(text: ref.watch(aboutProvider) ?? ""); + + List skills = ref.watch(skillsProvider); + List achievements = ref.watch(achievementsProvider); + + return Scaffold( + appBar: AppBar( + title: const Text('Edit Profile'), + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Edit About', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + TextField( + controller: aboutController, + onChanged: (newAbout) { + // ref.read(aboutProvider).state = newAbout; + }, + decoration: const InputDecoration( + hintText: 'Write something about yourself...', + ), + maxLines: 5, + ), + + // UI for editing skills + SkillsEditWidget( + skillsController: + TextEditingController(text: skills.toString())), + + // UI for editing achievements + AchievementsEditWidget( + achievementsController: + TextEditingController(text: achievements.toString())), + ], + ), + ), + ), + ); + } +} diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 4a85938..15c3917 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -1,10 +1,11 @@ import 'package:flutter/material.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'dart:math'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import '../screens/edit_profile.dart'; import '../provider/student_provider.dart'; +import '../provider/user_providers.dart'; import '../models/achievement.dart'; -import '../provider/achievements_edit_widget.dart'; -import '../provider/skills_edit_widget.dart'; -import '../provider/about_Edit_widget.dart'; class UserProfile extends ConsumerWidget { const UserProfile({Key? key}) : super(key: key); @@ -13,44 +14,58 @@ class UserProfile extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final student = ref.read(studentProvider); - final TextEditingController aboutController = - TextEditingController(text: student.about); - final TextEditingController skillsController = - TextEditingController(text: student.skills?.toString() ?? ""); - final TextEditingController achievementsController = - TextEditingController(text: student.achievements?.toString() ?? ""); - return Scaffold( appBar: AppBar( title: const Text('User Profile'), + actions: [ + IconButton( + icon: const Icon(Icons.edit), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => EditProfileScreen()), + ); + }, + ), + ], ), body: SingleChildScrollView( child: Container( - decoration: const BoxDecoration( - color: Colors.lightBlueAccent, - ), + color: Colors.lightBlueAccent, child: Padding( padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Consumer(builder: (context, ref, child) { - return CircleAvatar( - backgroundImage: student.profilePicURI != null - ? NetworkImage(student.profilePicURI!) - : const AssetImage('assets/openlake.png') - as ImageProvider, - radius: 55, - child: student.profilePicURI == null - ? const Icon( - Icons.person, - size: 55, - color: Colors.grey, - ) - : null, - ); - }), + // Profile Picture and Name + Column( + children: [ + CircleAvatar( + backgroundImage: student.profilePicURI != null + ? NetworkImage(student.profilePicURI!) + : const AssetImage('assets/openlake.png') + as ImageProvider, + radius: 55, + child: student.profilePicURI == null + ? const Icon( + Icons.person, + size: 55, + color: Colors.grey, + ) + : null, + ), + const SizedBox(height: 8), + Text( + student.studentNameController.text, + style: const TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + ], + ), const SizedBox(height: 16), + // User Details Card Card( color: Colors.white, shape: RoundedRectangleBorder( @@ -62,33 +77,55 @@ class UserProfile extends ConsumerWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - student.studentNameController.text, - style: const TextStyle( - fontSize: 28, - fontWeight: FontWeight.bold, - ), + buildInfoRow( + "ID", + student.studentRollNoController.text, ), - const SizedBox(height: 16), buildInfoRow( - "ID", student.studentRollNoController.text), + "Email", + student.studentEmailController.text, + ), buildInfoRow( - "Email", student.studentEmailController.text), - buildInfoRow("Branch", student.branch), - // buildInfoRow( - // "Class of", student.graduationYear ?? "202x"), - const SizedBox(height: 16), - AboutEditorWidget(), - // _buildInfoField("About", aboutController), - // const SizedBox(height: 16), - // _buildInfoField("Roles", values: student.role), + "Branch", + student.branch, + ), const SizedBox(height: 16), - SkillsEditWidget(skillsController: skillsController), + const Text( + 'About:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + Text(student.about ?? 'No information'), const SizedBox(height: 16), - AchievementsEditWidget( - achievementsController: achievementsController), + const Text( + 'Skills:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + // Display Skills as a pie chart + PieChart( + PieChartData( + sections: ref.watch(skillsProvider).map((skill) { + return PieChartSectionData( + value: skill.level.toDouble(), + title: skill.name, + color: getRandomColor(), + ); + }).toList(), + ), + ), const SizedBox(height: 16), - buildAchievementsColumn(student.achievements), + const Text( + 'Achievements:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + // Display Achievements as cards + for (var achievement in ref.watch(achievementsProvider)) + buildAchievementCard(achievement), ], ), ), @@ -116,54 +153,327 @@ class UserProfile extends ConsumerWidget { ); } - Widget _buildInfoField( - String title, { - TextEditingController? controller, - List? values, - }) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - title, - style: const TextStyle( - fontWeight: FontWeight.bold, - ), + Widget buildAchievementCard(Achievement achievement) { + return Card( + color: Colors.lightBlue, + elevation: 3, + margin: const EdgeInsets.symmetric(vertical: 8), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + achievement.name, + style: const TextStyle( + fontWeight: FontWeight.bold, + fontSize: 18, + ), + ), + const SizedBox(height: 8), + Text( + 'Date: ${achievement.date}', + style: const TextStyle(fontSize: 12), + ), + // Add description here + ], ), - if (controller != null) ...[ - TextField(controller: controller, enabled: false), - ] else ...[ - if (values != null && values.isNotEmpty) - for (var value in values) Text('- $value'), - if (values == null || values.isEmpty) const Text('- No Information'), - ], - ], + ), ); } - Widget buildAchievementsColumn(List? achievements) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text( - 'Achievements:', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - ), - if (achievements != null) - for (var achievement in achievements) - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('- ${achievement.name}'), - Text(' ${achievement.description}'), - ], - ), - ], - ); + Color getRandomColor() { + return Colors.primaries[Random().nextInt(Colors.primaries.length)]; } } + + +// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../screens/edit_profile.dart'; +// import '../provider/student_provider.dart'; +// import '../provider/user_providers.dart'; + +// class UserProfile extends ConsumerWidget { +// const UserProfile({Key? key}) : super(key: key); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final studentName = +// ref.read(studentProvider.notifier).studentNameController.text; + +// return Scaffold( +// appBar: AppBar( +// title: const Text('User Profile'), +// actions: [ +// IconButton( +// icon: const Icon(Icons.edit), +// onPressed: () { +// Navigator.push( +// context, +// MaterialPageRoute(builder: (context) => EditProfileScreen()), +// ); +// }, +// ), +// ], +// ), +// body: SingleChildScrollView( +// child: Container( +// decoration: const BoxDecoration( +// color: Colors.lightBlueAccent, +// ), +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Consumer(builder: (context, ref, child) { +// return CircleAvatar( +// backgroundImage: studentName.profilePicURI != null +// ? NetworkImage(studentName.profilePicURI!) +// : const AssetImage('assets/openlake.png') +// as ImageProvider, +// radius: 55, +// child: studentName.profilePicURI == null +// ? const Icon( +// Icons.person, +// size: 55, +// color: Colors.grey, +// ) +// : null, +// ); +// }), + +// // Display About using Riverpod +// Text( +// 'About:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// Text(ref.read(aboutProvider) ?? 'No information'), + +// // Display Skills using Riverpod +// Text( +// 'Skills:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// for (var skill in ref.watch(skillsProvider)) +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text('${skill.name} - ${skill.level}'), +// // Add a slider here if needed +// ], +// ), + +// // Display Achievements using Riverpod +// Text( +// 'Achievements:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// for (var achievement in ref.watch(achievementsProvider)) +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// achievement.name, +// style: TextStyle( +// fontWeight: FontWeight.bold, +// fontSize: 18, +// ), +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text( +// 'Date: ${achievement.date}', +// style: TextStyle(fontSize: 12), +// ), +// // Add description here +// ], +// ), +// ], +// ), +// ], +// ), +// ), +// ), +// ), +// ); +// } +// } + +// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../provider/student_provider.dart'; +// import '../models/achievement.dart'; +// import '../provider/achievements_edit_widget.dart'; +// import '../provider/skills_edit_widget.dart'; +// import '../provider/about_Edit_widget.dart'; + +// class UserProfile extends ConsumerWidget { +// const UserProfile({Key? key}) : super(key: key); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final student = ref.read(studentProvider); + +// final TextEditingController aboutController = +// TextEditingController(text: student.about); +// final TextEditingController skillsController = +// TextEditingController(text: student.skills?.toString() ?? ""); +// final TextEditingController achievementsController = +// TextEditingController(text: student.achievements?.toString() ?? ""); + +// return Scaffold( +// appBar: AppBar( +// title: const Text('User Profile'), +// ), +// body: SingleChildScrollView( +// child: Container( +// decoration: const BoxDecoration( +// color: Colors.lightBlueAccent, +// ), +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Consumer(builder: (context, ref, child) { +// return CircleAvatar( +// backgroundImage: student.profilePicURI != null +// ? NetworkImage(student.profilePicURI!) +// : const AssetImage('assets/openlake.png') +// as ImageProvider, +// radius: 55, +// child: student.profilePicURI == null +// ? const Icon( +// Icons.person, +// size: 55, +// color: Colors.grey, +// ) +// : null, +// ); +// }), +// const SizedBox(height: 16), +// Card( +// color: Colors.white, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.circular(20.0), +// ), +// elevation: 5, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// student.studentNameController.text, +// style: const TextStyle( +// fontSize: 28, +// fontWeight: FontWeight.bold, +// ), +// ), +// const SizedBox(height: 16), +// buildInfoRow( +// "ID", student.studentRollNoController.text), +// buildInfoRow( +// "Email", student.studentEmailController.text), +// buildInfoRow("Branch", student.branch), +// // buildInfoRow( +// // "Class of", student.graduationYear ?? "202x"), +// const SizedBox(height: 16), +// AboutEditorWidget(), +// // _buildInfoField("About", aboutController), +// // const SizedBox(height: 16), +// // _buildInfoField("Roles", values: student.role), +// const SizedBox(height: 16), +// SkillsEditWidget(skillsController: skillsController), +// const SizedBox(height: 16), +// AchievementsEditWidget( +// achievementsController: achievementsController), +// const SizedBox(height: 16), +// buildAchievementsColumn(student.achievements), +// ], +// ), +// ), +// ), +// ], +// ), +// ), +// ), +// ), +// ); +// } + +// Widget buildInfoRow(String title, String value) { +// return Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// Text(value), +// ], +// ); +// } + +// Widget _buildInfoField( +// String title, { +// TextEditingController? controller, +// List? values, +// }) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (controller != null) ...[ +// TextField(controller: controller, enabled: false), +// ] else ...[ +// if (values != null && values.isNotEmpty) +// for (var value in values) Text('- $value'), +// if (values == null || values.isEmpty) const Text('- No Information'), +// ], +// ], +// ); +// } + +// Widget buildAchievementsColumn(List? achievements) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Achievements:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// if (achievements != null) +// for (var achievement in achievements) +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text('- ${achievement.name}'), +// Text(' ${achievement.description}'), +// ], +// ), +// ], +// ); +// } +// } // import 'package:flutter/material.dart'; // import 'package:flutter_riverpod/flutter_riverpod.dart'; // import '../provider/student_provider.dart'; diff --git a/frontend/pubspec.lock b/frontend/pubspec.lock index ead7f6b..871fd2c 100644 --- a/frontend/pubspec.lock +++ b/frontend/pubspec.lock @@ -153,6 +153,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + equatable: + dependency: transitive + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" fake_async: dependency: transitive description: @@ -185,6 +193,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.1" + fl_chart: + dependency: "direct main" + description: + name: fl_chart + sha256: b5e2b0f13d93f8c532b5a2786bfb44580de1f50b927bf95813fa1af617e9caf8 + url: "https://pub.dev" + source: hosted + version: "0.66.1" flutter: dependency: "direct main" description: flutter diff --git a/frontend/pubspec.yaml b/frontend/pubspec.yaml index 74e8d8d..e50d92b 100644 --- a/frontend/pubspec.yaml +++ b/frontend/pubspec.yaml @@ -52,6 +52,7 @@ dependencies: awesome_snackbar_content: ^0.1.1 delightful_toast: ^1.1.0 syncfusion_flutter_sliders: ^24.2.3 + fl_chart: ^0.66.1 dev_dependencies: flutter_test: From f9e8bba594a9aa761dfa86508d5f0566126a4675 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Sun, 4 Feb 2024 20:41:42 +0530 Subject: [PATCH 12/29] ui change --- frontend/lib/provider/student_provider.dart | 76 ++++++++---- frontend/lib/screens/user_profile.dart | 121 ++++++++++---------- 2 files changed, 116 insertions(+), 81 deletions(-) diff --git a/frontend/lib/provider/student_provider.dart b/frontend/lib/provider/student_provider.dart index c246b8a..107d1a2 100644 --- a/frontend/lib/provider/student_provider.dart +++ b/frontend/lib/provider/student_provider.dart @@ -70,8 +70,38 @@ class StudentState { searchStudentController ?? this.searchStudentController, branch: branch ?? this.branch, role: role ?? this.role, + profilePicURI: profilePicURI ?? this.profilePicURI, + about: about ?? this.about, + graduationYear: graduationYear ?? this.graduationYear, + skills: skills ?? this.skills, + achievements: achievements ?? this.achievements, ); } + + Student getStudentById(String studentId) { + try { + return students.firstWhere((student) => student.id == studentId); + } catch (e) { + return Student( + // Default values or a placeholder student object + id: '1', + name: 'John Doe', + email: 'john.doe@example.com', + rollNumber: 'R001', + about: 'I am a computer science student.', + profilePicURI: + 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', + branch: 'Computer Science', + graduationYear: 2023, + skills: [DummySkills.skills[1], DummySkills.skills[2]], + achievements: [ + Dummyachievements.achievements[1], + Dummyachievements.achievements[2], + ], + roles: ['Core Member', 'Coordinator'], + ); + } + } } class StudentProvider extends StateNotifier { @@ -187,27 +217,27 @@ class StudentProvider extends StateNotifier { _logger.i("Removed student: ${student.name}"); } - Student getStudentById(String studentId) { - try { - return state.students.firstWhere((student) => student.id == studentId); - } catch (e) { - return Student( - id: '1', - name: 'John Doe', - email: 'john.doe@example.com', - rollNumber: 'R001', - about: 'I am a computer science student.', - profilePicURI: - 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', - branch: 'Computer Science', - graduationYear: 2023, - skills: [DummySkills.skills[1], DummySkills.skills[2]], - achievements: [ - Dummyachievements.achievements[1], - Dummyachievements.achievements[2] - ], - roles: ['Core Member', 'Coordinator'], - ); - } - } + // Student getStudentById(String studentId) { + // try { + // return state.students.firstWhere((student) => student.id == studentId); + // } catch (e) { + // return Student( + // id: '1', + // name: 'John Doe', + // email: 'john.doe@example.com', + // rollNumber: 'R001', + // about: 'I am a computer science student.', + // profilePicURI: + // 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', + // branch: 'Computer Science', + // graduationYear: 2023, + // skills: [DummySkills.skills[1], DummySkills.skills[2]], + // achievements: [ + // Dummyachievements.achievements[1], + // Dummyachievements.achievements[2] + // ], + // roles: ['Core Member', 'Coordinator'], + // ); + // } + // } } diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 15c3917..86b3a95 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -4,8 +4,8 @@ import 'dart:math'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../screens/edit_profile.dart'; import '../provider/student_provider.dart'; -import '../provider/user_providers.dart'; import '../models/achievement.dart'; +import '../models/student.dart'; class UserProfile extends ConsumerWidget { const UserProfile({Key? key}) : super(key: key); @@ -14,6 +14,9 @@ class UserProfile extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final student = ref.read(studentProvider); + // Retrieve student data by ID + final Student? currentStudent = student.getStudentById('1'); + return Scaffold( appBar: AppBar( title: const Text('User Profile'), @@ -41,12 +44,12 @@ class UserProfile extends ConsumerWidget { Column( children: [ CircleAvatar( - backgroundImage: student.profilePicURI != null - ? NetworkImage(student.profilePicURI!) + backgroundImage: currentStudent?.profilePicURI != null + ? NetworkImage(currentStudent!.profilePicURI!) : const AssetImage('assets/openlake.png') as ImageProvider, radius: 55, - child: student.profilePicURI == null + child: currentStudent?.profilePicURI == null ? const Icon( Icons.person, size: 55, @@ -56,7 +59,7 @@ class UserProfile extends ConsumerWidget { ), const SizedBox(height: 8), Text( - student.studentNameController.text, + currentStudent?.name ?? 'Unknown', style: const TextStyle( fontSize: 20, fontWeight: FontWeight.bold, @@ -72,61 +75,60 @@ class UserProfile extends ConsumerWidget { borderRadius: BorderRadius.circular(20.0), ), elevation: 5, - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildInfoRow( - "ID", - student.studentRollNoController.text, - ), - buildInfoRow( - "Email", - student.studentEmailController.text, - ), - buildInfoRow( - "Branch", - student.branch, - ), - const SizedBox(height: 16), - const Text( - 'About:', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - ), - Text(student.about ?? 'No information'), - const SizedBox(height: 16), - const Text( - 'Skills:', - style: TextStyle( - fontWeight: FontWeight.bold, + child: Container( + height: MediaQuery.of(context).size.height * 0.6, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + buildInfoRow("ID", currentStudent?.rollNumber ?? ''), + buildInfoRow("Email", currentStudent?.email ?? ''), + buildInfoRow("Branch", currentStudent?.branch ?? ''), + const SizedBox(height: 16), + const Text( + 'About:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), ), - ), - // Display Skills as a pie chart - PieChart( - PieChartData( - sections: ref.watch(skillsProvider).map((skill) { - return PieChartSectionData( - value: skill.level.toDouble(), - title: skill.name, - color: getRandomColor(), - ); - }).toList(), + Text(currentStudent?.about ?? 'No information'), + const SizedBox(height: 16), + const Text( + 'Skills:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), ), - ), - const SizedBox(height: 16), - const Text( - 'Achievements:', - style: TextStyle( - fontWeight: FontWeight.bold, + // Display Skills as a pie chart + if (currentStudent?.skills != null) + PieChart( + PieChartData( + sections: currentStudent!.skills! + .map( + (skill) => PieChartSectionData( + value: skill.level.toDouble(), + title: skill.name, + color: getRandomColor(), + ), + ) + .toList(), + ), + ), + const SizedBox(height: 16), + const Text( + 'Achievements:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), ), - ), - // Display Achievements as cards - for (var achievement in ref.watch(achievementsProvider)) - buildAchievementCard(achievement), - ], + // Display Achievements as cards + if (currentStudent?.achievements != null) + for (var achievement + in currentStudent!.achievements!) + buildAchievementCard(achievement), + ], + ), ), ), ), @@ -175,7 +177,10 @@ class UserProfile extends ConsumerWidget { 'Date: ${achievement.date}', style: const TextStyle(fontSize: 12), ), - // Add description here + Text( + achievement.description, + style: const TextStyle(fontSize: 12), + ), ], ), ), From 230730a92034d88255ac004864128016290a4579 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Sun, 4 Feb 2024 23:14:38 +0530 Subject: [PATCH 13/29] display code working --- frontend/lib/screens/edit_profile.dart | 13 +- frontend/lib/screens/user_profile.dart | 313 +++++++++++++++++++++---- 2 files changed, 282 insertions(+), 44 deletions(-) diff --git a/frontend/lib/screens/edit_profile.dart b/frontend/lib/screens/edit_profile.dart index c65af64..41493e8 100644 --- a/frontend/lib/screens/edit_profile.dart +++ b/frontend/lib/screens/edit_profile.dart @@ -5,6 +5,7 @@ import '../models/skills.dart'; import '../models/achievement.dart'; import '../provider/skills_edit_widget.dart'; import '../provider/achievements_edit_widget.dart'; +import 'dart:convert'; class EditProfileScreen extends ConsumerWidget { @override @@ -15,6 +16,9 @@ class EditProfileScreen extends ConsumerWidget { List skills = ref.watch(skillsProvider); List achievements = ref.watch(achievementsProvider); + String skillsJson = jsonEncode(skills); + String achievementsJson = jsonEncode(achievements); + return Scaffold( appBar: AppBar( title: const Text('Edit Profile'), @@ -45,13 +49,14 @@ class EditProfileScreen extends ConsumerWidget { // UI for editing skills SkillsEditWidget( - skillsController: - TextEditingController(text: skills.toString())), + skillsController: TextEditingController(text: skillsJson), + ), // UI for editing achievements AchievementsEditWidget( - achievementsController: - TextEditingController(text: achievements.toString())), + achievementsController: + TextEditingController(text: achievementsJson), + ), ], ), ), diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 86b3a95..485e1b7 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -13,8 +13,6 @@ class UserProfile extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final student = ref.read(studentProvider); - - // Retrieve student data by ID final Student? currentStudent = student.getStudentById('1'); return Scaffold( @@ -40,34 +38,23 @@ class UserProfile extends ConsumerWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - // Profile Picture and Name - Column( - children: [ - CircleAvatar( - backgroundImage: currentStudent?.profilePicURI != null - ? NetworkImage(currentStudent!.profilePicURI!) - : const AssetImage('assets/openlake.png') - as ImageProvider, - radius: 55, - child: currentStudent?.profilePicURI == null - ? const Icon( - Icons.person, - size: 55, - color: Colors.grey, - ) - : null, - ), - const SizedBox(height: 8), - Text( - currentStudent?.name ?? 'Unknown', - style: const TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - ), - ), - ], + CircleAvatar( + backgroundImage: currentStudent?.profilePicURI != null + ? NetworkImage(currentStudent!.profilePicURI!) + : const AssetImage('assets/openlake.png') + as ImageProvider, + radius: 55, + child: currentStudent?.profilePicURI == null + ? const Icon( + Icons.person, + size: 55, + color: Colors.grey, + ) + : null, ), + const SizedBox(height: 16), + // User Details Card Card( color: Colors.white, @@ -85,6 +72,8 @@ class UserProfile extends ConsumerWidget { buildInfoRow("ID", currentStudent?.rollNumber ?? ''), buildInfoRow("Email", currentStudent?.email ?? ''), buildInfoRow("Branch", currentStudent?.branch ?? ''), + buildInfoRow("Class of", + "${currentStudent?.graduationYear}" ?? ''), const SizedBox(height: 16), const Text( 'About:', @@ -93,40 +82,80 @@ class UserProfile extends ConsumerWidget { ), ), Text(currentStudent?.about ?? 'No information'), + const SizedBox(height: 16), + const Text( 'Skills:', style: TextStyle( fontWeight: FontWeight.bold, ), ), - // Display Skills as a pie chart + + // Display Skills as separate pie charts if (currentStudent?.skills != null) - PieChart( - PieChartData( - sections: currentStudent!.skills! + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: currentStudent!.skills! .map( - (skill) => PieChartSectionData( - value: skill.level.toDouble(), - title: skill.name, - color: getRandomColor(), + (skill) => SizedBox( + width: 120, + height: 120, + child: PieChart( + PieChartData( + sections: [ + PieChartSectionData( + value: skill.level.toDouble(), + title: skill.name, + color: getRandomColor(), + ), + PieChartSectionData( + value: (100 - skill.level) + .toDouble(), + color: Colors.transparent, + ), + ], + sectionsSpace: 0, + centerSpaceRadius: 0, + borderData: FlBorderData( + show: false, + ), + ), + ), ), ) .toList(), ), ), + const SizedBox(height: 16), + const Text( 'Achievements:', style: TextStyle( fontWeight: FontWeight.bold, ), ), - // Display Achievements as cards + + // Display Achievements as cards in 2 columns if (currentStudent?.achievements != null) - for (var achievement - in currentStudent!.achievements!) - buildAchievementCard(achievement), + Wrap( + spacing: 16, + runSpacing: 16, + children: currentStudent!.achievements! + .map( + (achievement) => SizedBox( + width: + (MediaQuery.of(context).size.width - + 48 - + 16) / + 2, + child: buildAchievementCard(achievement), + ), + ) + .toList(), + ), ], ), ), @@ -191,6 +220,210 @@ class UserProfile extends ConsumerWidget { return Colors.primaries[Random().nextInt(Colors.primaries.length)]; } } +// import 'package:flutter/material.dart'; +// import 'package:fl_chart/fl_chart.dart'; +// import 'dart:math'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../screens/edit_profile.dart'; +// import '../provider/student_provider.dart'; +// import '../models/achievement.dart'; +// import '../models/student.dart'; + +// class UserProfile extends ConsumerWidget { +// const UserProfile({Key? key}) : super(key: key); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final student = ref.read(studentProvider); + +// // Retrieve student data by ID +// final Student? currentStudent = student.getStudentById('1'); + +// return Scaffold( +// appBar: AppBar( +// title: const Text('User Profile'), +// actions: [ +// IconButton( +// icon: const Icon(Icons.edit), +// onPressed: () { +// Navigator.push( +// context, +// MaterialPageRoute(builder: (context) => EditProfileScreen()), +// ); +// }, +// ), +// ], +// ), +// body: SingleChildScrollView( +// child: Container( +// color: Colors.lightBlueAccent, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// // Profile Picture and Name +// Column( +// children: [ +// CircleAvatar( +// backgroundImage: currentStudent?.profilePicURI != null +// ? NetworkImage(currentStudent!.profilePicURI!) +// : const AssetImage('assets/openlake.png') +// as ImageProvider, +// radius: 55, +// child: currentStudent?.profilePicURI == null +// ? const Icon( +// Icons.person, +// size: 55, +// color: Colors.grey, +// ) +// : null, +// ), +// const SizedBox(height: 8), +// Text( +// currentStudent?.name ?? 'Name', +// style: const TextStyle( +// fontSize: 20, +// fontWeight: FontWeight.bold, +// ), +// ), +// ], +// ), +// const SizedBox(height: 16), +// // User Details Card +// Card( +// color: Colors.white, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.circular(20.0), +// ), +// elevation: 5, +// child: Container( +// height: MediaQuery.of(context).size.height * 0.6, +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// buildInfoRow("ID", currentStudent?.rollNumber ?? ''), +// buildInfoRow("Email", currentStudent?.email ?? ''), +// buildInfoRow("Branch", currentStudent?.branch ?? ''), +// buildInfoRow("Class of", +// "${currentStudent?.graduationYear}" ?? ''), +// const SizedBox(height: 16), +// const Text( +// 'About:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// Text(currentStudent?.about ?? 'No information'), +// const SizedBox(height: 16), +// const Text( +// 'Skills:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// // Display Skills as a pie chart +// if (currentStudent?.skills != null) +// SizedBox( +// width: 120, +// height: 120, +// child: PieChart( +// PieChartData( +// sections: currentStudent!.skills! +// .map( +// (skill) => PieChartSectionData( +// value: skill.level.toDouble(), +// title: skill.name, +// color: getRandomColor(), +// ), +// ) +// .toList(), +// sectionsSpace: 0, +// centerSpaceRadius: 0, +// borderData: FlBorderData( +// show: false, +// ), +// ), +// ), +// ), +// const SizedBox(height: 16), +// const Text( +// 'Achievements:', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// // Display Achievements as cards +// if (currentStudent?.achievements != null) +// for (var achievement +// in currentStudent!.achievements!) +// buildAchievementCard(achievement), +// ], +// ), +// ), +// ), +// ), +// ], +// ), +// ), +// ), +// ), +// ); +// } + +// Widget buildInfoRow(String title, String value) { +// return Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text( +// title, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// Text(value), +// ], +// ); +// } + +// Widget buildAchievementCard(Achievement achievement) { +// return Card( +// color: Colors.lightBlue, +// elevation: 3, +// margin: const EdgeInsets.symmetric(vertical: 8), +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// achievement.name, +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// fontSize: 18, +// ), +// ), +// const SizedBox(height: 8), +// Text( +// 'Date: ${achievement.date}', +// style: const TextStyle(fontSize: 12), +// ), +// Text( +// achievement.description, +// style: const TextStyle(fontSize: 12), +// ), +// ], +// ), +// ), +// ); +// } + +// Color getRandomColor() { +// return Colors.primaries[Random().nextInt(Colors.primaries.length)]; +// } +// } // import 'package:flutter/material.dart'; From 8d0efb40dceee14f07494305a94d1fbc46e63e4c Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Mon, 5 Feb 2024 00:36:26 +0530 Subject: [PATCH 14/29] edit profile page added --- frontend/lib/provider/about_Edit_widget.dart | 97 +- .../provider/achievements_edit_widget.dart | 117 +- frontend/lib/provider/skills_edit_widget.dart | 187 ++- frontend/lib/screens/edit_profile.dart | 94 +- frontend/lib/screens/user_profile.dart | 1245 +---------------- 5 files changed, 450 insertions(+), 1290 deletions(-) diff --git a/frontend/lib/provider/about_Edit_widget.dart b/frontend/lib/provider/about_Edit_widget.dart index 00bfb5a..ca6e383 100644 --- a/frontend/lib/provider/about_Edit_widget.dart +++ b/frontend/lib/provider/about_Edit_widget.dart @@ -2,15 +2,32 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../provider/student_provider.dart'; -class AboutEditorWidget extends ConsumerWidget { - const AboutEditorWidget({Key? key}) : super(key: key); +final aboutProvider = Provider((ref) { + return ref.watch(aboutControllerProvider); +}); + +final aboutControllerProvider = + StateNotifierProvider((ref) { + return AboutController(); +}); + +class AboutController extends StateNotifier { + AboutController() : super(""); + + void updateAbout(String about) { + state = about; + } +} + +class AboutEditWidget extends ConsumerWidget { + const AboutEditWidget({Key? key}) : super(key: key); @override Widget build(BuildContext context, WidgetRef ref) { - final student = ref.read(studentProvider); + final about = ref.watch(aboutProvider); final TextEditingController aboutController = - TextEditingController(text: student.about); + TextEditingController(text: about); return Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -24,7 +41,7 @@ class AboutEditorWidget extends ConsumerWidget { TextField( controller: aboutController, onChanged: (newAbout) { - ref.read(studentProvider.notifier).editAbout(newAbout); + ref.read(aboutControllerProvider.notifier).updateAbout(newAbout); }, decoration: const InputDecoration( hintText: 'Write something about yourself...', @@ -35,3 +52,73 @@ class AboutEditorWidget extends ConsumerWidget { ); } } +// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../provider/student_provider.dart'; + +// class AboutEditorWidget extends ConsumerWidget { +// const AboutEditorWidget({Key? key}) : super(key: key); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final student = ref.read(studentProvider); + +// final TextEditingController aboutController = +// TextEditingController(text: student.about); + +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// 'About', +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// TextFormField( +// controller: aboutController, +// onChanged: (newAbout) { +// ref.read(studentProvider.notifier).editAbout(newAbout); +// }, +// decoration: const InputDecoration( +// hintText: 'Write something about yourself...', +// ), +// maxLines: 5, +// ), +// ], +// ); +// } +// } +// // class AboutEditorWidget extends ConsumerWidget { +// // const AboutEditorWidget({Key? key}) : super(key: key); + +// // @override +// // Widget build(BuildContext context, WidgetRef ref) { +// // final student = ref.read(studentProvider); + +// // final TextEditingController aboutController = +// // TextEditingController(text: student.about); + +// // return Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // Text( +// // 'About', +// // style: const TextStyle( +// // fontWeight: FontWeight.bold, +// // ), +// // ), +// // TextField( +// // controller: aboutController, +// // onChanged: (newAbout) { +// // ref.read(studentProvider.notifier).editAbout(newAbout); +// // }, +// // decoration: const InputDecoration( +// // hintText: 'Write something about yourself...', +// // ), +// // maxLines: 5, +// // ), +// // ], +// // ); +// // } +// // } diff --git a/frontend/lib/provider/achievements_edit_widget.dart b/frontend/lib/provider/achievements_edit_widget.dart index 90f6cee..62e8ada 100644 --- a/frontend/lib/provider/achievements_edit_widget.dart +++ b/frontend/lib/provider/achievements_edit_widget.dart @@ -1,18 +1,44 @@ import 'package:flutter/material.dart'; import 'package:calendar_date_picker2/calendar_date_picker2.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import '../models/achievement.dart'; -class AchievementsEditWidget extends StatelessWidget { +final achievementsProvider = Provider>((ref) { + // Your achievements data + return ref.watch(achievementsControllerProvider); +}); + +final achievementsControllerProvider = + StateNotifierProvider>((ref) { + return AchievementsController(); +}); + +class AchievementsController extends StateNotifier> { + AchievementsController() : super([]); + + void addAchievement(Achievement achievement) { + state = [...state, achievement]; + } + + void updateAchievement(int index, Achievement achievement) { + state = [...state]; + state[index] = achievement; + } + + void removeAchievement(int index) { + state = [...state]..removeAt(index); + } +} + +class AchievementsEditWidget extends ConsumerWidget { final TextEditingController achievementsController; - List _selectedDate; - AchievementsEditWidget({ - required this.achievementsController, - Key? key, - }) : _selectedDate = [DateTime.now()], - super(key: key); + const AchievementsEditWidget({required this.achievementsController}); @override - Widget build(BuildContext context) { + Widget build(BuildContext context, WidgetRef ref) { + final achievements = ref.watch(achievementsProvider); + return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -22,18 +48,73 @@ class AchievementsEditWidget extends StatelessWidget { fontWeight: FontWeight.bold, ), ), - TextFormField( - controller: achievementsController, - decoration: const InputDecoration(labelText: 'Achievement'), + ListView.builder( + shrinkWrap: true, + itemCount: achievements.length, + itemBuilder: (context, index) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextFormField( + initialValue: achievements[index].name, + onChanged: (value) { + ref + .read(achievementsControllerProvider.notifier) + .updateAchievement( + index, + Achievement( + id: achievements[index].id, + name: value, + date: achievements[index].date, + description: achievements[index].description, + ), + ); + }, + decoration: const InputDecoration(labelText: 'Achievement'), + ), + CalendarDatePicker2( + config: CalendarDatePicker2Config(), + value: [achievements[index].date], + onValueChanged: (List dates) { + if (dates.isNotEmpty && dates[0] != null) { + ref + .read(achievementsControllerProvider.notifier) + .updateAchievement( + index, + Achievement( + id: achievements[index].id, + name: achievements[index].name, + date: dates[0]!, + description: achievements[index].description, + ), + ); + } + }, + ), + IconButton( + icon: const Icon(Icons.delete), + onPressed: () { + ref + .read(achievementsControllerProvider.notifier) + .removeAchievement(index); + }, + ), + ], + ); + }, ), - CalendarDatePicker2( - config: CalendarDatePicker2Config(), - value: _selectedDate, - onValueChanged: (dates) { - if (dates != null && dates.isNotEmpty) { - _selectedDate = [dates.first]; - } + ElevatedButton( + onPressed: () { + ref.read(achievementsControllerProvider.notifier).addAchievement( + Achievement( + id: UniqueKey().toString(), + name: "", + date: DateTime.now(), + description: "", + ), + ); }, + child: const Text("Add Achievement"), ), ], ); diff --git a/frontend/lib/provider/skills_edit_widget.dart b/frontend/lib/provider/skills_edit_widget.dart index f1d1279..f1ba5c6 100644 --- a/frontend/lib/provider/skills_edit_widget.dart +++ b/frontend/lib/provider/skills_edit_widget.dart @@ -1,13 +1,44 @@ import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:syncfusion_flutter_sliders/sliders.dart'; +import '../models/skills.dart'; -class SkillsEditWidget extends StatelessWidget { +final skillsProvider = Provider>((ref) { + // Your skills data + return ref.watch(skillsControllerProvider); +}); + +final skillsControllerProvider = + StateNotifierProvider>((ref) { + return SkillsController(); +}); + +class SkillsController extends StateNotifier> { + SkillsController() : super([]); + + void addSkill(Skill skill) { + state = [...state, skill]; + } + + void updateSkill(int index, Skill skill) { + state = [...state]; + state[index] = skill; + } + + void removeSkill(int index) { + state = [...state]..removeAt(index); + } +} + +class SkillsEditWidget extends ConsumerWidget { final TextEditingController skillsController; const SkillsEditWidget({required this.skillsController}); @override - Widget build(BuildContext context) { + Widget build(BuildContext context, WidgetRef ref) { + final skills = ref.watch(skillsProvider); + return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -17,15 +48,155 @@ class SkillsEditWidget extends StatelessWidget { fontWeight: FontWeight.bold, ), ), - SfSlider( - min: 0.0, - max: 100.0, - value: double.parse(skillsController.text), - onChanged: (dynamic value) { - skillsController.text = value.toStringAsFixed(0); + ListView.builder( + shrinkWrap: true, + itemCount: skills.length, + itemBuilder: (context, index) { + return Row( + children: [ + Expanded( + child: TextFormField( + initialValue: skills[index].name, + onChanged: (value) { + ref.read(skillsControllerProvider.notifier).updateSkill( + index, + Skill( + id: skills[index].id, + name: value, + level: skills[index].level), + ); + }, + decoration: const InputDecoration(labelText: 'Skill'), + ), + ), + Expanded( + child: SfSlider( + min: 0.0, + max: 100.0, + value: skills[index].level.toDouble(), + onChanged: (dynamic value) { + ref.read(skillsControllerProvider.notifier).updateSkill( + index, + Skill( + id: skills[index].id, + name: skills[index].name, + level: value.toInt()), + ); + }, + ), + ), + IconButton( + icon: const Icon(Icons.delete), + onPressed: () { + ref + .read(skillsControllerProvider.notifier) + .removeSkill(index); + }, + ), + ], + ); }, ), + ElevatedButton( + onPressed: () { + ref.read(skillsControllerProvider.notifier).addSkill( + Skill(id: UniqueKey().toString(), name: "", level: 0), + ); + }, + child: const Text("Add Skill"), + ), ], ); } } +// import 'package:flutter/material.dart'; +// import 'package:syncfusion_flutter_sliders/sliders.dart'; + +// // class SkillsEditWidget extends StatelessWidget { +// // final TextEditingController skillsController; + +// // const SkillsEditWidget({required this.skillsController}); + +// // @override +// // Widget build(BuildContext context) { +// // List skills = (jsonDecode(skillsController.text) as List) +// // .map((json) => Skill.fromJson(json)) +// // .toList(); + +// // return Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // const Text( +// // 'Skills', +// // style: TextStyle( +// // fontWeight: FontWeight.bold, +// // ), +// // ), +// // ListView.builder( +// // shrinkWrap: true, +// // itemCount: skills.length, +// // itemBuilder: (context, index) { +// // return Row( +// // children: [ +// // Expanded( +// // child: TextFormField( +// // initialValue: skills[index].name, +// // onChanged: (value) { +// // skills[index].name = value; +// // updateSkills(); +// // }, +// // decoration: const InputDecoration(labelText: 'Skill'), +// // ), +// // ), +// // Expanded( +// // child: SfSlider( +// // min: 0.0, +// // max: 100.0, +// // value: skills[index].level.toDouble(), +// // onChanged: (dynamic value) { +// // skills[index].level = value.toInt(); +// // updateSkills(); +// // }, +// // ), +// // ), +// // ], +// // ); +// // }, +// // ), +// // ], +// // ); +// // } + +// // void updateSkills() { +// // skillsController.text = jsonEncode(skills); +// // } +// // } + +// class SkillsEditWidget extends StatelessWidget { +// final TextEditingController skillsController; + +// const SkillsEditWidget({required this.skillsController}); + +// @override +// Widget build(BuildContext context) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Skills', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// SfSlider( +// min: 0.0, +// max: 100.0, +// value: double.parse(skillsController.text), +// onChanged: (dynamic value) { +// skillsController.text = value.toStringAsFixed(0); +// }, +// ), +// ], +// ); +// } +// } diff --git a/frontend/lib/screens/edit_profile.dart b/frontend/lib/screens/edit_profile.dart index 41493e8..431ab20 100644 --- a/frontend/lib/screens/edit_profile.dart +++ b/frontend/lib/screens/edit_profile.dart @@ -1,20 +1,19 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import '../provider/user_providers.dart'; -import '../models/skills.dart'; -import '../models/achievement.dart'; +// import '../provider/user_providers.dart'; +// import '../models/skills.dart'; +// import '../models/achievement.dart'; import '../provider/skills_edit_widget.dart'; import '../provider/achievements_edit_widget.dart'; +import '../provider/about_Edit_widget.dart'; import 'dart:convert'; class EditProfileScreen extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - TextEditingController aboutController = - TextEditingController(text: ref.watch(aboutProvider) ?? ""); - - List skills = ref.watch(skillsProvider); - List achievements = ref.watch(achievementsProvider); + final aboutController = ref.watch(aboutControllerProvider); + final skills = ref.watch(skillsProvider); + final achievements = ref.watch(achievementsProvider); String skillsJson = jsonEncode(skills); String achievementsJson = jsonEncode(achievements); @@ -36,22 +35,11 @@ class EditProfileScreen extends ConsumerWidget { fontSize: 20, ), ), - TextField( - controller: aboutController, - onChanged: (newAbout) { - // ref.read(aboutProvider).state = newAbout; - }, - decoration: const InputDecoration( - hintText: 'Write something about yourself...', - ), - maxLines: 5, - ), - + AboutEditWidget(), // UI for editing skills SkillsEditWidget( skillsController: TextEditingController(text: skillsJson), ), - // UI for editing achievements AchievementsEditWidget( achievementsController: @@ -64,3 +52,69 @@ class EditProfileScreen extends ConsumerWidget { ); } } +// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../provider/user_providers.dart'; +// import '../models/skills.dart'; +// import '../models/achievement.dart'; +// import '../provider/skills_edit_widget.dart'; +// import '../provider/achievements_edit_widget.dart'; +// import 'dart:convert'; + +// class EditProfileScreen extends ConsumerWidget { +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// TextEditingController aboutController = +// TextEditingController(text: ref.watch(aboutProvider) ?? ""); + +// List skills = ref.watch(skillsProvider); +// List achievements = ref.watch(achievementsProvider); + +// String skillsJson = jsonEncode(skills); +// String achievementsJson = jsonEncode(achievements); + +// return Scaffold( +// appBar: AppBar( +// title: const Text('Edit Profile'), +// ), +// body: SingleChildScrollView( +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Edit About', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// fontSize: 20, +// ), +// ), +// TextField( +// controller: aboutController, +// onChanged: (newAbout) { +// // ref.read(aboutProvider).state = newAbout; +// }, +// decoration: const InputDecoration( +// hintText: 'Write something about yourself...', +// ), +// maxLines: 5, +// ), + +// // UI for editing skills +// SkillsEditWidget( +// skillsController: TextEditingController(text: skillsJson), +// ), + +// // UI for editing achievements +// AchievementsEditWidget( +// achievementsController: +// TextEditingController(text: achievementsJson), +// ), +// ], +// ), +// ), +// ), +// ); +// } +// } diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 485e1b7..90f19fb 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -83,7 +83,7 @@ class UserProfile extends ConsumerWidget { ), Text(currentStudent?.about ?? 'No information'), - const SizedBox(height: 16), + const SizedBox(height: 5), const Text( 'Skills:', @@ -101,7 +101,7 @@ class UserProfile extends ConsumerWidget { .map( (skill) => SizedBox( width: 120, - height: 120, + height: 80, child: PieChart( PieChartData( sections: [ @@ -129,7 +129,7 @@ class UserProfile extends ConsumerWidget { ), ), - const SizedBox(height: 16), + const SizedBox(height: 5), const Text( 'Achievements:', @@ -149,7 +149,7 @@ class UserProfile extends ConsumerWidget { width: (MediaQuery.of(context).size.width - 48 - - 16) / + 40) / 2, child: buildAchievementCard(achievement), ), @@ -198,10 +198,10 @@ class UserProfile extends ConsumerWidget { achievement.name, style: const TextStyle( fontWeight: FontWeight.bold, - fontSize: 18, + fontSize: 15, ), ), - const SizedBox(height: 8), + // const SizedBox(height: 8), Text( 'Date: ${achievement.date}', style: const TextStyle(fontSize: 12), @@ -220,1236 +220,3 @@ class UserProfile extends ConsumerWidget { return Colors.primaries[Random().nextInt(Colors.primaries.length)]; } } -// import 'package:flutter/material.dart'; -// import 'package:fl_chart/fl_chart.dart'; -// import 'dart:math'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../screens/edit_profile.dart'; -// import '../provider/student_provider.dart'; -// import '../models/achievement.dart'; -// import '../models/student.dart'; - -// class UserProfile extends ConsumerWidget { -// const UserProfile({Key? key}) : super(key: key); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final student = ref.read(studentProvider); - -// // Retrieve student data by ID -// final Student? currentStudent = student.getStudentById('1'); - -// return Scaffold( -// appBar: AppBar( -// title: const Text('User Profile'), -// actions: [ -// IconButton( -// icon: const Icon(Icons.edit), -// onPressed: () { -// Navigator.push( -// context, -// MaterialPageRoute(builder: (context) => EditProfileScreen()), -// ); -// }, -// ), -// ], -// ), -// body: SingleChildScrollView( -// child: Container( -// color: Colors.lightBlueAccent, -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// // Profile Picture and Name -// Column( -// children: [ -// CircleAvatar( -// backgroundImage: currentStudent?.profilePicURI != null -// ? NetworkImage(currentStudent!.profilePicURI!) -// : const AssetImage('assets/openlake.png') -// as ImageProvider, -// radius: 55, -// child: currentStudent?.profilePicURI == null -// ? const Icon( -// Icons.person, -// size: 55, -// color: Colors.grey, -// ) -// : null, -// ), -// const SizedBox(height: 8), -// Text( -// currentStudent?.name ?? 'Name', -// style: const TextStyle( -// fontSize: 20, -// fontWeight: FontWeight.bold, -// ), -// ), -// ], -// ), -// const SizedBox(height: 16), -// // User Details Card -// Card( -// color: Colors.white, -// shape: RoundedRectangleBorder( -// borderRadius: BorderRadius.circular(20.0), -// ), -// elevation: 5, -// child: Container( -// height: MediaQuery.of(context).size.height * 0.6, -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// buildInfoRow("ID", currentStudent?.rollNumber ?? ''), -// buildInfoRow("Email", currentStudent?.email ?? ''), -// buildInfoRow("Branch", currentStudent?.branch ?? ''), -// buildInfoRow("Class of", -// "${currentStudent?.graduationYear}" ?? ''), -// const SizedBox(height: 16), -// const Text( -// 'About:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// Text(currentStudent?.about ?? 'No information'), -// const SizedBox(height: 16), -// const Text( -// 'Skills:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// // Display Skills as a pie chart -// if (currentStudent?.skills != null) -// SizedBox( -// width: 120, -// height: 120, -// child: PieChart( -// PieChartData( -// sections: currentStudent!.skills! -// .map( -// (skill) => PieChartSectionData( -// value: skill.level.toDouble(), -// title: skill.name, -// color: getRandomColor(), -// ), -// ) -// .toList(), -// sectionsSpace: 0, -// centerSpaceRadius: 0, -// borderData: FlBorderData( -// show: false, -// ), -// ), -// ), -// ), -// const SizedBox(height: 16), -// const Text( -// 'Achievements:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// // Display Achievements as cards -// if (currentStudent?.achievements != null) -// for (var achievement -// in currentStudent!.achievements!) -// buildAchievementCard(achievement), -// ], -// ), -// ), -// ), -// ), -// ], -// ), -// ), -// ), -// ), -// ); -// } - -// Widget buildInfoRow(String title, String value) { -// return Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// Text(value), -// ], -// ); -// } - -// Widget buildAchievementCard(Achievement achievement) { -// return Card( -// color: Colors.lightBlue, -// elevation: 3, -// margin: const EdgeInsets.symmetric(vertical: 8), -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// achievement.name, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// fontSize: 18, -// ), -// ), -// const SizedBox(height: 8), -// Text( -// 'Date: ${achievement.date}', -// style: const TextStyle(fontSize: 12), -// ), -// Text( -// achievement.description, -// style: const TextStyle(fontSize: 12), -// ), -// ], -// ), -// ), -// ); -// } - -// Color getRandomColor() { -// return Colors.primaries[Random().nextInt(Colors.primaries.length)]; -// } -// } - - -// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../screens/edit_profile.dart'; -// import '../provider/student_provider.dart'; -// import '../provider/user_providers.dart'; - -// class UserProfile extends ConsumerWidget { -// const UserProfile({Key? key}) : super(key: key); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final studentName = -// ref.read(studentProvider.notifier).studentNameController.text; - -// return Scaffold( -// appBar: AppBar( -// title: const Text('User Profile'), -// actions: [ -// IconButton( -// icon: const Icon(Icons.edit), -// onPressed: () { -// Navigator.push( -// context, -// MaterialPageRoute(builder: (context) => EditProfileScreen()), -// ); -// }, -// ), -// ], -// ), -// body: SingleChildScrollView( -// child: Container( -// decoration: const BoxDecoration( -// color: Colors.lightBlueAccent, -// ), -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// Consumer(builder: (context, ref, child) { -// return CircleAvatar( -// backgroundImage: studentName.profilePicURI != null -// ? NetworkImage(studentName.profilePicURI!) -// : const AssetImage('assets/openlake.png') -// as ImageProvider, -// radius: 55, -// child: studentName.profilePicURI == null -// ? const Icon( -// Icons.person, -// size: 55, -// color: Colors.grey, -// ) -// : null, -// ); -// }), - -// // Display About using Riverpod -// Text( -// 'About:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// Text(ref.read(aboutProvider) ?? 'No information'), - -// // Display Skills using Riverpod -// Text( -// 'Skills:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// for (var skill in ref.watch(skillsProvider)) -// Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text('${skill.name} - ${skill.level}'), -// // Add a slider here if needed -// ], -// ), - -// // Display Achievements using Riverpod -// Text( -// 'Achievements:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// for (var achievement in ref.watch(achievementsProvider)) -// Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// achievement.name, -// style: TextStyle( -// fontWeight: FontWeight.bold, -// fontSize: 18, -// ), -// ), -// Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Text( -// 'Date: ${achievement.date}', -// style: TextStyle(fontSize: 12), -// ), -// // Add description here -// ], -// ), -// ], -// ), -// ], -// ), -// ), -// ), -// ), -// ); -// } -// } - -// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../provider/student_provider.dart'; -// import '../models/achievement.dart'; -// import '../provider/achievements_edit_widget.dart'; -// import '../provider/skills_edit_widget.dart'; -// import '../provider/about_Edit_widget.dart'; - -// class UserProfile extends ConsumerWidget { -// const UserProfile({Key? key}) : super(key: key); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final student = ref.read(studentProvider); - -// final TextEditingController aboutController = -// TextEditingController(text: student.about); -// final TextEditingController skillsController = -// TextEditingController(text: student.skills?.toString() ?? ""); -// final TextEditingController achievementsController = -// TextEditingController(text: student.achievements?.toString() ?? ""); - -// return Scaffold( -// appBar: AppBar( -// title: const Text('User Profile'), -// ), -// body: SingleChildScrollView( -// child: Container( -// decoration: const BoxDecoration( -// color: Colors.lightBlueAccent, -// ), -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// Consumer(builder: (context, ref, child) { -// return CircleAvatar( -// backgroundImage: student.profilePicURI != null -// ? NetworkImage(student.profilePicURI!) -// : const AssetImage('assets/openlake.png') -// as ImageProvider, -// radius: 55, -// child: student.profilePicURI == null -// ? const Icon( -// Icons.person, -// size: 55, -// color: Colors.grey, -// ) -// : null, -// ); -// }), -// const SizedBox(height: 16), -// Card( -// color: Colors.white, -// shape: RoundedRectangleBorder( -// borderRadius: BorderRadius.circular(20.0), -// ), -// elevation: 5, -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// student.studentNameController.text, -// style: const TextStyle( -// fontSize: 28, -// fontWeight: FontWeight.bold, -// ), -// ), -// const SizedBox(height: 16), -// buildInfoRow( -// "ID", student.studentRollNoController.text), -// buildInfoRow( -// "Email", student.studentEmailController.text), -// buildInfoRow("Branch", student.branch), -// // buildInfoRow( -// // "Class of", student.graduationYear ?? "202x"), -// const SizedBox(height: 16), -// AboutEditorWidget(), -// // _buildInfoField("About", aboutController), -// // const SizedBox(height: 16), -// // _buildInfoField("Roles", values: student.role), -// const SizedBox(height: 16), -// SkillsEditWidget(skillsController: skillsController), -// const SizedBox(height: 16), -// AchievementsEditWidget( -// achievementsController: achievementsController), -// const SizedBox(height: 16), -// buildAchievementsColumn(student.achievements), -// ], -// ), -// ), -// ), -// ], -// ), -// ), -// ), -// ), -// ); -// } - -// Widget buildInfoRow(String title, String value) { -// return Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// Text(value), -// ], -// ); -// } - -// Widget _buildInfoField( -// String title, { -// TextEditingController? controller, -// List? values, -// }) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (controller != null) ...[ -// TextField(controller: controller, enabled: false), -// ] else ...[ -// if (values != null && values.isNotEmpty) -// for (var value in values) Text('- $value'), -// if (values == null || values.isEmpty) const Text('- No Information'), -// ], -// ], -// ); -// } - -// Widget buildAchievementsColumn(List? achievements) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Achievements:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (achievements != null) -// for (var achievement in achievements) -// Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text('- ${achievement.name}'), -// Text(' ${achievement.description}'), -// ], -// ), -// ], -// ); -// } -// } -// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../provider/student_provider.dart'; -// import '../models/achievement.dart'; - -// class UserProfile extends ConsumerWidget { -// const UserProfile({Key? key}) : super(key: key); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final student = ref.read(studentProvider); - -// return Scaffold( -// appBar: AppBar( -// title: const Text('User Profile'), -// ), -// body: Container( -// decoration: const BoxDecoration( -// color: Colors.lightBlueAccent, -// ), -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// ConsumerWidget(builder: (_, ref, __) { -// return CircleAvatar( -// backgroundImage: student.profilePicURI != null -// ? NetworkImage(student.profilePicURI!) -// : const AssetImage('assets/openlake.png') -// as ImageProvider, -// radius: 55, -// child: student.profilePicURI == null -// ? const Icon( -// Icons.person, -// size: 55, -// color: Colors.grey, -// ) -// : null, -// ); -// }), -// const SizedBox(height: 16), -// Card( -// color: Colors.white, -// shape: RoundedRectangleBorder( -// borderRadius: BorderRadius.circular(20.0), -// ), -// elevation: 5, -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// student.studentNameController.text, -// style: const TextStyle( -// fontSize: 28, -// fontWeight: FontWeight.bold, -// ), -// ), -// const SizedBox(height: 16), -// buildInfoRow("ID", student.studentRollNoController.text), -// buildInfoRow("Email", student.studentEmailController.text), -// buildInfoRow("Branch", student.branch), -// buildInfoRow( -// "Class of", student.graduationYear ?? "202x"), -// const SizedBox(height: 16), -// _buildInfoField("About", aboutController), -// const SizedBox(height: 16), -// _buildInfoField("Roles", values: student.role), -// const SizedBox(height: 16), -// _buildInfoField("Skills", skillsController), -// const SizedBox(height: 16), -// buildAchievementsColumn(student.achievements), -// ], -// ), -// ), -// ), -// ], -// ), -// ), -// ), -// ); -// } - -// Widget buildInfoRow(String title, String value) { -// return Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// Text(value), -// ], -// ); -// } - -// Widget _buildInfoField( -// String title, { -// TextEditingController? controller, -// List? values, -// }) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (controller != null) ...[ -// TextField(controller: controller, enabled: false), -// ] else ...[ -// if (values != null && values.isNotEmpty) -// for (var value in values) Text('- $value'), -// if (values == null || values.isEmpty) const Text('- No Information'), -// ], -// ], -// ); -// } - -// Widget buildAchievementsColumn(List? achievements) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Achievements:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (achievements != null) -// for (var achievement in achievements) -// Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text('- ${achievement.title}'), -// Text(' ${achievement.description}'), -// ], -// ), -// ], -// ); -// } -// } -// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// // import '../models/student.dart'; -// import '../provider/student_provider.dart'; -// import '../models/achievement.dart'; -// // import '../models/skills.dart'; - -// class UserProfile extends ConsumerWidget { -// const UserProfile({Key? key}) : super(key: key); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final student = ref.watch(studentProvider.notifier); - -// final TextEditingController aboutController = -// TextEditingController(text: student.about); -// final TextEditingController skillsController = -// TextEditingController(text: student.skills?.join(", ") ?? ""); - -// return Scaffold( -// appBar: AppBar( -// title: const Text('User Profile'), -// ), -// body: Container( -// decoration: const BoxDecoration( -// color: Colors.lightBlueAccent, -// ), -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// CircleAvatar( -// backgroundImage: student.profilePicURI != null -// ? NetworkImage(student.profilePicURI!) -// : const AssetImage('assets/openlake.png') -// as ImageProvider, -// radius: 55, -// child: student.profilePicURI == null -// ? const Icon( -// Icons.person, -// size: 55, -// color: Colors.grey, -// ) -// : null, -// ), -// const SizedBox(height: 16), -// Card( -// color: Colors.white, -// shape: RoundedRectangleBorder( -// borderRadius: BorderRadius.circular(20.0), -// ), -// elevation: 5, -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// student.name, -// style: const TextStyle( -// fontSize: 28, -// fontWeight: FontWeight.bold, -// ), -// ), -// const SizedBox(height: 16), -// buildInfoRow("ID", student.rollNumber), -// buildInfoRow("Email", student.email), -// buildInfoRow("Branch", student.branch), -// buildInfoRow( -// "Class of", student.graduationYear ?? "202x"), -// const SizedBox(height: 16), -// _buildInfoField("About", aboutController), -// const SizedBox(height: 16), -// _buildInfoField("Roles", values: student.roles), -// const SizedBox(height: 16), -// _buildInfoField("Skills", skillsController), -// const SizedBox(height: 16), -// buildAchievementsColumn(student.achievements), -// ], -// ), -// ), -// ), -// ], -// ), -// ), -// ), -// ); -// } - -// Widget buildInfoRow(String title, String value) { -// return Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// Text(value), -// ], -// ); -// } - -// Widget _buildInfoField( -// String title, { -// TextEditingController? controller, -// List? values, -// }) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (controller != null) ...[ -// TextField(controller: controller, enabled: false), -// ] else ...[ -// if (values != null && values.isNotEmpty) -// for (var value in values) Text('- $value'), -// if (values == null || values.isEmpty) const Text('- No Information'), -// ], -// ], -// ); -// } - -// Widget buildAchievementsColumn(List? achievements) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Achievements:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (achievements != null) -// for (var achievement in achievements) -// Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text('- ${achievement.title}'), -// Text(' ${achievement.description}'), -// ], -// ), -// ], -// ); -// } -// } - - -// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// // import '../constants/dummy.dart'; - -// import '../models/student.dart'; -// import '../provider/student_provider.dart'; - -// bool isEditMode = false; -// TextEditingController achievementsController = TextEditingController(); - -// class UserProfile extends ConsumerWidget { -// const UserProfile({super.key}); -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final student = ref.read(studentProvider); -// final TextEditingController aboutController = -// TextEditingController(text: student.about); -// final TextEditingController skillsController = -// TextEditingController(text: student.skills?.join(", ") ?? ""); -// // final TextEditingController achievementController = TextEditingController(); -// // final TextEditingController achievementsController = TextEditingController( -// // text: student.achievements?.map((ach) => "${ach.title}: ${ach.description}").join("\n") ?? ""); - -// // bool isEditMode = false; - -// return Scaffold( -// appBar: AppBar( -// title: const Text('User Profile'), -// actions: [ -// IconButton( -// icon: Icon(isEditMode ? Icons.save : Icons.edit), -// onPressed: () { -// ref.refresh(studentProvider); - -// // setState(() { -// // if (isEditMode) { -// // // Save changes to the student object -// // // student.about = aboutController.text; -// // // student.skills = skillsController.text.split(", ").toList(); -// // // student.achievements = _parseAchievements(); -// // } -// // isEditMode = !isEditMode; -// // }); -// }, -// ), -// ], -// ), -// body: Container( -// decoration: const BoxDecoration( -// color: Colors.lightBlueAccent, -// ), -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// CircleAvatar( -// backgroundImage: student.profilePicURI != null -// ? NetworkImage(student.profilePicURI!) -// : const AssetImage('assets/openlake.png') -// as ImageProvider, -// radius: 55, -// child: student.profilePicURI == null -// ? const Icon( -// Icons.person, -// size: 55, -// color: Colors.grey, -// ) -// : null, -// ), -// const SizedBox(height: 16), -// Card( -// color: Colors.white, -// shape: RoundedRectangleBorder( -// borderRadius: BorderRadius.circular(20.0), -// ), -// elevation: 5, -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// student.name, -// style: const TextStyle( -// fontSize: 28, -// fontWeight: FontWeight.bold, -// ), -// ), -// const SizedBox(height: 16), -// buildInfoRow("ID", student.rollNumber), -// buildInfoRow("Email", student.studentMail), -// buildInfoRow("Branch", student.branch), -// buildInfoRow( -// "Class of", student.graduationYear ?? "202x"), -// const SizedBox(height: 16), -// _buildEditableField( -// "About", -// aboutController, -// isEditMode, -// ), -// const SizedBox(height: 16), -// _buildEditableField( -// "Roles", -// null, -// isEditMode, -// values: student.roles, -// ), -// const SizedBox(height: 16), -// _buildEditableField( -// "Skills", -// skillsController, -// isEditMode, -// ), -// const SizedBox(height: 16), -// buildAchievementsColumn(student.achievements), -// ], -// ), -// ), -// ), -// ], -// ), -// ), -// ), -// ); -// } - -// Widget buildInfoRow(String title, String value) { -// return Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// Text(value), -// ], -// ); -// } - -// Widget _buildEditableField( -// String title, -// TextEditingController? controller, -// bool isEditable, { -// List? values, -// }) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (isEditable) ...[ -// if (controller != null) TextField(controller: controller), -// if (values != null) ...[ -// for (var value in values) Text('- $value'), -// ] -// ] else ...[ -// if (values != null && values.isNotEmpty) -// for (var value in values) Text('- $value'), -// if (values == null || values.isEmpty) const Text('- No Information'), -// ], -// ], -// ); -// } - -// Widget buildAchievementsColumn(List? achievements) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Achievements:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (isEditMode) ...[ -// if (achievementsController != null) -// TextField(controller: achievementsController), -// ] else ...[ -// if (achievements != null) -// for (var achievement in achievements) -// Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text('- ${achievement.title}'), -// Text(' ${achievement.description}'), -// ], -// ), -// ], -// ], -// ); -// } - - // List? _parseAchievements() { - // final lines = achievementsController.text.split("\n"); - // return lines - // .map((line) { - // final parts = line.split(": "); - // return Achievement(title: parts[0], description: parts[1]); - // }) - // .where((ach) => ach.title.isNotEmpty && ach.description.isNotEmpty) - // .toList(); - // } -// } -// import 'package:flutter/material.dart'; -// import '../constants/dummy.dart'; -// import '../models/student.dart'; - -// class UserProfile extends StatefulWidget { -// @override -// _UserProfileState createState() => _UserProfileState(); -// } - -// class _UserProfileState extends State { -// late TextEditingController aboutController; -// late TextEditingController skillsController; -// late TextEditingController achievementsController; - -// bool isEditMode = false; - -// @override -// void initState() { -// super.initState(); -// aboutController = -// TextEditingController(text: DummyStudents.students[0].about); -// skillsController = TextEditingController( -// text: DummyStudents.students[0].skills?.join(", ") ?? ""); -// achievementsController = TextEditingController( -// text: DummyStudents.students[0].achievements -// ?.map((ach) => "${ach.title}: ${ach.description}") -// .join("\n") ?? -// ""); -// } - -// @override -// void dispose() { -// aboutController.dispose(); -// skillsController.dispose(); -// achievementsController.dispose(); -// super.dispose(); -// } - -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar( -// title: const Text('User Profile'), -// actions: [ -// IconButton( -// icon: Icon(isEditMode ? Icons.save : Icons.edit), -// onPressed: () { -// setState(() { -// if (isEditMode) { -// // Save changes to the student object -// // DummyStudents.students[0].about = aboutController.text; -// // DummyStudents.students[0].skills = -// // skillsController.text.split(", ").toList(); -// // DummyStudents.students[0].achievements = _parseAchievements(); -// } -// isEditMode = !isEditMode; -// }); -// }, -// ), -// ], -// ), -// body: Container( -// decoration: const BoxDecoration( -// color: Colors.lightBlueAccent, -// ), -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// CircleAvatar( -// backgroundImage: DummyStudents.students[0].profilePicURI != null -// ? NetworkImage(DummyStudents.students[0].profilePicURI!) -// : AssetImage('assets/openlake.png') -// as ImageProvider, -// radius: 55, -// child: DummyStudents.students[0].profilePicURI == null -// ? const Icon( -// Icons.person, -// size: 55, -// color: Colors.grey, -// ) -// : null, -// ), -// const SizedBox(height: 16), -// Card( -// color: Colors.white, -// shape: RoundedRectangleBorder( -// borderRadius: BorderRadius.circular(20.0), -// ), -// elevation: 5, -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// DummyStudents.students[0].name, -// style: const TextStyle( -// fontSize: 28, -// fontWeight: FontWeight.bold, -// ), -// ), -// const SizedBox(height: 16), -// buildInfoRow("ID", DummyStudents.students[0].rollNumber), -// buildInfoRow( -// "Email", DummyStudents.students[0].studentMail), -// buildInfoRow("Branch", DummyStudents.students[0].branch), -// buildInfoRow( -// "Class of", -// DummyStudents.students[0].graduationYear ?? "202x", -// ), -// const SizedBox(height: 16), -// _buildEditableField( -// "About", -// aboutController, -// isEditMode, -// ), -// const SizedBox(height: 16), -// _buildEditableField( -// "Roles", -// null, -// isEditMode, -// values: DummyStudents.students[0].roles, -// ), -// const SizedBox(height: 16), -// _buildEditableField( -// "Skills", -// skillsController, -// isEditMode, -// ), -// const SizedBox(height: 16), -// buildAchievementsColumn( -// DummyStudents.students[0].achievements), -// ], -// ), -// ), -// ), -// ], -// ), -// ), -// ), -// ); -// } - -// Widget buildInfoRow(String title, String value) { -// return Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// Text(value), -// ], -// ); -// } - -// Widget _buildEditableField( -// String title, -// TextEditingController? controller, -// bool isEditable, { -// List? values, -// }) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// title, -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (isEditable) ...[ -// if (controller != null) TextField(controller: controller), -// if (values != null) ...[ -// for (var value in values) Text('- $value'), -// ] -// ] else ...[ -// if (values != null && values.isNotEmpty) -// for (var value in values) Text('- $value'), -// if (values == null || values.isEmpty) const Text('- No Information'), -// ], -// ], -// ); -// } - -// Widget buildAchievementsColumn(List? achievements) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Achievements:', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// if (isEditMode) ...[ -// if (achievementsController != null) -// TextField(controller: achievementsController), -// ] else ...[ -// if (achievements != null) -// for (var achievement in achievements) -// Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text('- ${achievement.title}'), -// Text(' ${achievement.description}'), -// ], -// ), -// ], -// ], -// ); -// } - -// List? _parseAchievements() { -// final lines = achievementsController.text.split("\n"); -// return lines -// .map((line) { -// final parts = line.split(": "); -// return Achievement(title: parts[0], description: parts[1]); -// }) -// .where((ach) => ach.title.isNotEmpty && ach.description.isNotEmpty) -// .toList(); -// } -// } \ No newline at end of file From 54b24e6cf2cf1eb570471b54cfa592984714c1fd Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Mon, 5 Feb 2024 00:46:26 +0530 Subject: [PATCH 15/29] removed unused import --- frontend/lib/provider/about_Edit_widget.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/lib/provider/about_Edit_widget.dart b/frontend/lib/provider/about_Edit_widget.dart index ca6e383..a5608da 100644 --- a/frontend/lib/provider/about_Edit_widget.dart +++ b/frontend/lib/provider/about_Edit_widget.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import '../provider/student_provider.dart'; +// import '../provider/student_provider.dart'; final aboutProvider = Provider((ref) { return ref.watch(aboutControllerProvider); From 0fc1b3b5af21efa7958fe898e1a2107787bb22e2 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Mon, 5 Feb 2024 01:34:11 +0530 Subject: [PATCH 16/29] added scrolling for skills and achievements in case of many entries --- frontend/lib/constants/dummy_entries.dart | 23 +-- frontend/lib/screens/user_profile.dart | 207 +++++++++++++--------- 2 files changed, 134 insertions(+), 96 deletions(-) diff --git a/frontend/lib/constants/dummy_entries.dart b/frontend/lib/constants/dummy_entries.dart index 20755d1..c976e5a 100644 --- a/frontend/lib/constants/dummy_entries.dart +++ b/frontend/lib/constants/dummy_entries.dart @@ -28,20 +28,15 @@ class DummyStudents { ), Student( id: '2', - name: 'John Doe', - email: 'john.doe@example.com', - rollNumber: 'R001', - about: 'I am a computer science student.', - profilePicURI: - 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', - branch: 'Computer Science', - graduationYear: 2023, - skills: [DummySkills.skills[1], DummySkills.skills[2]], - achievements: [ - Dummyachievements.achievements[1], - Dummyachievements.achievements[2] - ], - roles: ['Core Member', 'Coordinator'], + name: 'Alice Johnson', + email: 'alice.johnson@example.com', + rollNumber: '67890', + about: 'I am a mechanical engineering student.', + profilePicURI: '', + branch: 'Mechanical Engineering', + roles: ['Student,Class Representative'], + skills: DummySkills.skills.sublist(0, 5), + achievements: Dummyachievements.achievements.sublist(0, 5), ), Student( id: '3', diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 90f19fb..7c11f9c 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -13,7 +13,7 @@ class UserProfile extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final student = ref.read(studentProvider); - final Student? currentStudent = student.getStudentById('1'); + final Student? currentStudent = student.getStudentById('2'); return Scaffold( appBar: AppBar( @@ -63,100 +63,143 @@ class UserProfile extends ConsumerWidget { ), elevation: 5, child: Container( - height: MediaQuery.of(context).size.height * 0.6, - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildInfoRow("ID", currentStudent?.rollNumber ?? ''), - buildInfoRow("Email", currentStudent?.email ?? ''), - buildInfoRow("Branch", currentStudent?.branch ?? ''), - buildInfoRow("Class of", - "${currentStudent?.graduationYear}" ?? ''), - const SizedBox(height: 16), - const Text( - 'About:', - style: TextStyle( - fontWeight: FontWeight.bold, + constraints: BoxConstraints( + minHeight: MediaQuery.of(context).size.height * 0.6, + ), + child: IntrinsicHeight( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + buildInfoRow( + "ID", currentStudent?.rollNumber ?? ''), + buildInfoRow("Email", currentStudent?.email ?? ''), + buildInfoRow( + "Branch", currentStudent?.branch ?? ''), + buildInfoRow("Class of", + "${currentStudent?.graduationYear}" ?? ''), + const SizedBox(height: 16), + const Text( + 'About:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), ), - ), - Text(currentStudent?.about ?? 'No information'), + Text(currentStudent?.about ?? 'No information'), - const SizedBox(height: 5), + const SizedBox(height: 5), - const Text( - 'Skills:', - style: TextStyle( - fontWeight: FontWeight.bold, + const Text( + 'Skills:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), ), - ), + const SizedBox(height: 5), + // const Text( + // 'scroll right >> ', + // style: TextStyle( + // fontWeight: FontWeight.w100, + // fontSize: 12, + // ), + // ), - // Display Skills as separate pie charts - if (currentStudent?.skills != null) - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: currentStudent!.skills! - .map( - (skill) => SizedBox( - width: 120, - height: 80, - child: PieChart( - PieChartData( - sections: [ - PieChartSectionData( - value: skill.level.toDouble(), - title: skill.name, - color: getRandomColor(), - ), - PieChartSectionData( - value: (100 - skill.level) - .toDouble(), - color: Colors.transparent, + // Display Skills as separate pie charts + if (currentStudent?.skills != null) + Column( + children: [ + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: currentStudent!.skills! + .map( + (skill) => SizedBox( + width: 105, + height: 80, + child: PieChart( + PieChartData( + sections: [ + PieChartSectionData( + value: skill.level + .toDouble(), + title: skill.name, + color: getRandomColor(), + ), + PieChartSectionData( + value: (100 - skill.level) + .toDouble(), + title: '', + color: Color.fromARGB( + 255, 184, 212, 240), + ), + ], + sectionsSpace: 0, + centerSpaceRadius: 0, + borderData: FlBorderData( + show: false, + ), + ), ), - ], - sectionsSpace: 0, - centerSpaceRadius: 0, - borderData: FlBorderData( - show: false, ), - ), - ), - ), - ) - .toList(), + ) + .toList(), + ), + ), + const SizedBox(height: 10), + Slider( + value: 10, + onChanged: (double value) {}, + min: 0, + max: 100, + ), + ], ), - ), - const SizedBox(height: 5), + const SizedBox(height: 5), - const Text( - 'Achievements:', - style: TextStyle( - fontWeight: FontWeight.bold, + const Text( + 'Achievements:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), ), - ), - // Display Achievements as cards in 2 columns - if (currentStudent?.achievements != null) - Wrap( - spacing: 16, - runSpacing: 16, - children: currentStudent!.achievements! - .map( - (achievement) => SizedBox( - width: - (MediaQuery.of(context).size.width - - 48 - - 40) / - 2, - child: buildAchievementCard(achievement), - ), - ) - .toList(), + // Make Achievements section scrollable + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: currentStudent?.achievements + ?.map( + (achievement) => SizedBox( + width: (MediaQuery.of(context) + .size + .width - + 48 - + 40) / + 2, + child: buildAchievementCard( + achievement), + ), + ) + .toList() ?? + [], + ), + ), + const SizedBox(height: 10), +// Add a vertical slider for achievements + Slider( + value: 10, + onChanged: (double value) {}, + min: 0, + max: 100, + divisions: + 5, // Adjust the number of divisions as needed + label: 'Achievement Slider', + // vertical: true, // Set to true for a vertical slider ), - ], + ], + ), ), ), ), From 34aa8c07ef36a40339bdf4002d80f5ef91206267 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Mon, 5 Feb 2024 01:47:16 +0530 Subject: [PATCH 17/29] changes aligned with origin --- frontend/lib/constants/dummy_entries.dart | 48 +++++++++++------------ frontend/lib/routes/routes.dart | 2 - frontend/pubspec.lock | 8 ---- 3 files changed, 24 insertions(+), 34 deletions(-) diff --git a/frontend/lib/constants/dummy_entries.dart b/frontend/lib/constants/dummy_entries.dart index bf20dbf..01c32a3 100644 --- a/frontend/lib/constants/dummy_entries.dart +++ b/frontend/lib/constants/dummy_entries.dart @@ -287,30 +287,30 @@ class DummyStudents { ]; } -class DummySkills { - static List skills = [ - Skill(id: '1', name: 'Flutter', level: 80), - Skill(id: '2', name: 'C++', level: 100), - Skill(id: '3', name: 'javascript', level: 20), - Skill(id: '4', name: 'Nodejs', level: 30), - Skill(id: '5', name: 'Reactjs', level: 40), - Skill(id: '6', name: 'MongoDB', level: 50), - Skill(id: '7', name: 'Graphic Designing', level: 60), - Skill(id: '8', name: 'chess', level: 70), - Skill(id: '9', name: 'cricket', level: 80), - Skill(id: '10', name: 'VScode', level: 100), - Skill(id: '11', name: 'Dart', level: 100), - Skill(id: '12', name: 'Typing', level: 90), - Skill(id: '13', name: 'Drawing', level: 80), - Skill(id: '14', name: 'Painting', level: 70), - Skill(id: '15', name: 'Sketching', level: 60), - Skill(id: '16', name: 'Programming', level: 50), - Skill(id: '17', name: 'Python', level: 40), - Skill(id: '18', name: 'C', level: 30), - Skill(id: '19', name: 'Speaking', level: 20), - Skill(id: '20', name: 'Sleeping', level: 10) - ]; -} +// class DummySkills { +// static List skills = [ +// Skill(id: '1', name: 'Flutter', level: 80), +// Skill(id: '2', name: 'C++', level: 100), +// Skill(id: '3', name: 'javascript', level: 20), +// Skill(id: '4', name: 'Nodejs', level: 30), +// Skill(id: '5', name: 'Reactjs', level: 40), +// Skill(id: '6', name: 'MongoDB', level: 50), +// Skill(id: '7', name: 'Graphic Designing', level: 60), +// Skill(id: '8', name: 'chess', level: 70), +// Skill(id: '9', name: 'cricket', level: 80), +// Skill(id: '10', name: 'VScode', level: 100), +// Skill(id: '11', name: 'Dart', level: 100), +// Skill(id: '12', name: 'Typing', level: 90), +// Skill(id: '13', name: 'Drawing', level: 80), +// Skill(id: '14', name: 'Painting', level: 70), +// Skill(id: '15', name: 'Sketching', level: 60), +// Skill(id: '16', name: 'Programming', level: 50), +// Skill(id: '17', name: 'Python', level: 40), +// Skill(id: '18', name: 'C', level: 30), +// Skill(id: '19', name: 'Speaking', level: 20), +// Skill(id: '20', name: 'Sleeping', level: 10) +// ]; +// } class Dummyachievements { static List achievements = [ diff --git a/frontend/lib/routes/routes.dart b/frontend/lib/routes/routes.dart index f9c290b..6250141 100644 --- a/frontend/lib/routes/routes.dart +++ b/frontend/lib/routes/routes.dart @@ -10,10 +10,8 @@ import '../screens/admin/add_menu.dart'; import '../screens/admin/view_courses.dart'; import '../screens/admin/view_faculty.dart'; import '../screens/admin/view_menu.dart'; -import '../screens/auth/login_page.dart'; import '../screens/user_profile.dart'; import '../screens/home.dart'; -import '../screens/auth/login_page.dart'; import '../screens/auth/admin_login.dart'; import '../screens/auth/user_login.dart'; diff --git a/frontend/pubspec.lock b/frontend/pubspec.lock index f2517fe..871fd2c 100644 --- a/frontend/pubspec.lock +++ b/frontend/pubspec.lock @@ -153,14 +153,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - email_validator: - dependency: "direct main" - description: - name: email_validator - sha256: e9a90f27ab2b915a27d7f9c2a7ddda5dd752d6942616ee83529b686fc086221b - url: "https://pub.dev" - source: hosted - version: "2.1.17" equatable: dependency: transitive description: From cb49de1019dc133a9e59013e0ded6c76356365dc Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Mon, 5 Feb 2024 02:09:00 +0530 Subject: [PATCH 18/29] final changes-name and roles --- frontend/lib/constants/dummy_entries.dart | 5 +--- frontend/lib/provider/student_provider.dart | 5 +--- frontend/lib/provider/user_providers.dart | 9 ------ frontend/lib/screens/edit_profile.dart | 7 ----- frontend/lib/screens/user_profile.dart | 32 ++++++++++++++++----- 5 files changed, 27 insertions(+), 31 deletions(-) delete mode 100644 frontend/lib/provider/user_providers.dart diff --git a/frontend/lib/constants/dummy_entries.dart b/frontend/lib/constants/dummy_entries.dart index 01c32a3..9839a7b 100644 --- a/frontend/lib/constants/dummy_entries.dart +++ b/frontend/lib/constants/dummy_entries.dart @@ -19,10 +19,7 @@ class DummyStudents { branch: 'Computer Science', graduationYear: 2023, skills: [DummySkills.skills[1], DummySkills.skills[2]], - achievements: [ - Dummyachievements.achievements[1], - Dummyachievements.achievements[2] - ], + achievements: Dummyachievements.achievements.sublist(0, 5), roles: ['Core Member', 'Coordinator'], ), Student( diff --git a/frontend/lib/provider/student_provider.dart b/frontend/lib/provider/student_provider.dart index 107d1a2..459392f 100644 --- a/frontend/lib/provider/student_provider.dart +++ b/frontend/lib/provider/student_provider.dart @@ -94,10 +94,7 @@ class StudentState { branch: 'Computer Science', graduationYear: 2023, skills: [DummySkills.skills[1], DummySkills.skills[2]], - achievements: [ - Dummyachievements.achievements[1], - Dummyachievements.achievements[2], - ], + achievements: Dummyachievements.achievements.sublist(0, 5), roles: ['Core Member', 'Coordinator'], ); } diff --git a/frontend/lib/provider/user_providers.dart b/frontend/lib/provider/user_providers.dart deleted file mode 100644 index 502e139..0000000 --- a/frontend/lib/provider/user_providers.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import '../constants/dummy_entries.dart'; -import '../models/skills.dart'; -import '../models/achievement.dart'; - -final aboutProvider = StateProvider((ref) => null); -final skillsProvider = StateProvider>((ref) => DummySkills.skills); -final achievementsProvider = - StateProvider>((ref) => Dummyachievements.achievements); diff --git a/frontend/lib/screens/edit_profile.dart b/frontend/lib/screens/edit_profile.dart index 431ab20..f0d6b03 100644 --- a/frontend/lib/screens/edit_profile.dart +++ b/frontend/lib/screens/edit_profile.dart @@ -28,13 +28,6 @@ class EditProfileScreen extends ConsumerWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text( - 'Edit About', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), AboutEditWidget(), // UI for editing skills SkillsEditWidget( diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 7c11f9c..5eefe01 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -13,7 +13,7 @@ class UserProfile extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final student = ref.read(studentProvider); - final Student? currentStudent = student.getStudentById('2'); + final Student? currentStudent = student.getStudentById('1'); return Scaffold( appBar: AppBar( @@ -53,7 +53,17 @@ class UserProfile extends ConsumerWidget { : null, ), - const SizedBox(height: 16), + const SizedBox(height: 8), + + Text( + currentStudent?.name ?? '', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 18, + ), + ), + + const SizedBox(height: 8), // User Details Card Card( @@ -90,6 +100,18 @@ class UserProfile extends ConsumerWidget { const SizedBox(height: 5), + const Text( + 'Roles: ', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + Text( + '${currentStudent?.roles?.join(", ") ?? "No roles"}'), + // style: TextStyle(),) + + const SizedBox(height: 16), + const Text( 'Skills:', style: TextStyle( @@ -165,7 +187,6 @@ class UserProfile extends ConsumerWidget { ), ), - // Make Achievements section scrollable SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row( @@ -187,16 +208,13 @@ class UserProfile extends ConsumerWidget { ), ), const SizedBox(height: 10), -// Add a vertical slider for achievements Slider( value: 10, onChanged: (double value) {}, min: 0, max: 100, - divisions: - 5, // Adjust the number of divisions as needed + divisions: 5, label: 'Achievement Slider', - // vertical: true, // Set to true for a vertical slider ), ], ), From e7319b7cf9b0cd324bb0a46aac7fbdd382fbba75 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Sat, 10 Feb 2024 14:53:10 +0530 Subject: [PATCH 19/29] removed reduntant code and files --- frontend/lib/models/student2.dart | 18 ---- frontend/lib/provider/about_Edit_widget.dart | 71 -------------- .../provider/achievements_edit_widget.dart | 1 - frontend/lib/provider/skills_edit_widget.dart | 92 ------------------- frontend/lib/provider/student_provider.dart | 24 ----- frontend/lib/screens/edit_profile.dart | 73 +-------------- frontend/lib/screens/home.dart | 68 -------------- frontend/lib/screens/user_profile.dart | 8 -- 8 files changed, 1 insertion(+), 354 deletions(-) delete mode 100644 frontend/lib/models/student2.dart diff --git a/frontend/lib/models/student2.dart b/frontend/lib/models/student2.dart deleted file mode 100644 index a388e30..0000000 --- a/frontend/lib/models/student2.dart +++ /dev/null @@ -1,18 +0,0 @@ -class Student { - Student( - {required this.name, - required this.studentMail, - required this.rollNumber, - required this.branch, - required this.role, - this.id, - this.collegeId}); - - final String? id; - final String? collegeId; - final String name; - final String studentMail; - final String rollNumber; - final String branch; - final String role; -} diff --git a/frontend/lib/provider/about_Edit_widget.dart b/frontend/lib/provider/about_Edit_widget.dart index a5608da..f1fea87 100644 --- a/frontend/lib/provider/about_Edit_widget.dart +++ b/frontend/lib/provider/about_Edit_widget.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../provider/student_provider.dart'; final aboutProvider = Provider((ref) { return ref.watch(aboutControllerProvider); @@ -52,73 +51,3 @@ class AboutEditWidget extends ConsumerWidget { ); } } -// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../provider/student_provider.dart'; - -// class AboutEditorWidget extends ConsumerWidget { -// const AboutEditorWidget({Key? key}) : super(key: key); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final student = ref.read(studentProvider); - -// final TextEditingController aboutController = -// TextEditingController(text: student.about); - -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// 'About', -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// TextFormField( -// controller: aboutController, -// onChanged: (newAbout) { -// ref.read(studentProvider.notifier).editAbout(newAbout); -// }, -// decoration: const InputDecoration( -// hintText: 'Write something about yourself...', -// ), -// maxLines: 5, -// ), -// ], -// ); -// } -// } -// // class AboutEditorWidget extends ConsumerWidget { -// // const AboutEditorWidget({Key? key}) : super(key: key); - -// // @override -// // Widget build(BuildContext context, WidgetRef ref) { -// // final student = ref.read(studentProvider); - -// // final TextEditingController aboutController = -// // TextEditingController(text: student.about); - -// // return Column( -// // crossAxisAlignment: CrossAxisAlignment.start, -// // children: [ -// // Text( -// // 'About', -// // style: const TextStyle( -// // fontWeight: FontWeight.bold, -// // ), -// // ), -// // TextField( -// // controller: aboutController, -// // onChanged: (newAbout) { -// // ref.read(studentProvider.notifier).editAbout(newAbout); -// // }, -// // decoration: const InputDecoration( -// // hintText: 'Write something about yourself...', -// // ), -// // maxLines: 5, -// // ), -// // ], -// // ); -// // } -// // } diff --git a/frontend/lib/provider/achievements_edit_widget.dart b/frontend/lib/provider/achievements_edit_widget.dart index 62e8ada..e3a63ec 100644 --- a/frontend/lib/provider/achievements_edit_widget.dart +++ b/frontend/lib/provider/achievements_edit_widget.dart @@ -4,7 +4,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../models/achievement.dart'; final achievementsProvider = Provider>((ref) { - // Your achievements data return ref.watch(achievementsControllerProvider); }); diff --git a/frontend/lib/provider/skills_edit_widget.dart b/frontend/lib/provider/skills_edit_widget.dart index f1ba5c6..5a8f91f 100644 --- a/frontend/lib/provider/skills_edit_widget.dart +++ b/frontend/lib/provider/skills_edit_widget.dart @@ -4,7 +4,6 @@ import 'package:syncfusion_flutter_sliders/sliders.dart'; import '../models/skills.dart'; final skillsProvider = Provider>((ref) { - // Your skills data return ref.watch(skillsControllerProvider); }); @@ -109,94 +108,3 @@ class SkillsEditWidget extends ConsumerWidget { ); } } -// import 'package:flutter/material.dart'; -// import 'package:syncfusion_flutter_sliders/sliders.dart'; - -// // class SkillsEditWidget extends StatelessWidget { -// // final TextEditingController skillsController; - -// // const SkillsEditWidget({required this.skillsController}); - -// // @override -// // Widget build(BuildContext context) { -// // List skills = (jsonDecode(skillsController.text) as List) -// // .map((json) => Skill.fromJson(json)) -// // .toList(); - -// // return Column( -// // crossAxisAlignment: CrossAxisAlignment.start, -// // children: [ -// // const Text( -// // 'Skills', -// // style: TextStyle( -// // fontWeight: FontWeight.bold, -// // ), -// // ), -// // ListView.builder( -// // shrinkWrap: true, -// // itemCount: skills.length, -// // itemBuilder: (context, index) { -// // return Row( -// // children: [ -// // Expanded( -// // child: TextFormField( -// // initialValue: skills[index].name, -// // onChanged: (value) { -// // skills[index].name = value; -// // updateSkills(); -// // }, -// // decoration: const InputDecoration(labelText: 'Skill'), -// // ), -// // ), -// // Expanded( -// // child: SfSlider( -// // min: 0.0, -// // max: 100.0, -// // value: skills[index].level.toDouble(), -// // onChanged: (dynamic value) { -// // skills[index].level = value.toInt(); -// // updateSkills(); -// // }, -// // ), -// // ), -// // ], -// // ); -// // }, -// // ), -// // ], -// // ); -// // } - -// // void updateSkills() { -// // skillsController.text = jsonEncode(skills); -// // } -// // } - -// class SkillsEditWidget extends StatelessWidget { -// final TextEditingController skillsController; - -// const SkillsEditWidget({required this.skillsController}); - -// @override -// Widget build(BuildContext context) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Skills', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// SfSlider( -// min: 0.0, -// max: 100.0, -// value: double.parse(skillsController.text), -// onChanged: (dynamic value) { -// skillsController.text = value.toStringAsFixed(0); -// }, -// ), -// ], -// ); -// } -// } diff --git a/frontend/lib/provider/student_provider.dart b/frontend/lib/provider/student_provider.dart index 459392f..e3b041a 100644 --- a/frontend/lib/provider/student_provider.dart +++ b/frontend/lib/provider/student_provider.dart @@ -213,28 +213,4 @@ class StudentProvider extends StateNotifier { state = newState; _logger.i("Removed student: ${student.name}"); } - - // Student getStudentById(String studentId) { - // try { - // return state.students.firstWhere((student) => student.id == studentId); - // } catch (e) { - // return Student( - // id: '1', - // name: 'John Doe', - // email: 'john.doe@example.com', - // rollNumber: 'R001', - // about: 'I am a computer science student.', - // profilePicURI: - // 'https://cdn4.sharechat.com/img_907710_35cec5f5_1681916904360_sc.jpg?tenant=sc&referrer=pwa-sharechat-service&f=360_sc.jpg', - // branch: 'Computer Science', - // graduationYear: 2023, - // skills: [DummySkills.skills[1], DummySkills.skills[2]], - // achievements: [ - // Dummyachievements.achievements[1], - // Dummyachievements.achievements[2] - // ], - // roles: ['Core Member', 'Coordinator'], - // ); - // } - // } } diff --git a/frontend/lib/screens/edit_profile.dart b/frontend/lib/screens/edit_profile.dart index f0d6b03..d1bceae 100644 --- a/frontend/lib/screens/edit_profile.dart +++ b/frontend/lib/screens/edit_profile.dart @@ -1,11 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../provider/user_providers.dart'; -// import '../models/skills.dart'; -// import '../models/achievement.dart'; import '../provider/skills_edit_widget.dart'; import '../provider/achievements_edit_widget.dart'; -import '../provider/about_Edit_widget.dart'; +import '../provider/about_edit_widget.dart'; import 'dart:convert'; class EditProfileScreen extends ConsumerWidget { @@ -29,11 +26,9 @@ class EditProfileScreen extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AboutEditWidget(), - // UI for editing skills SkillsEditWidget( skillsController: TextEditingController(text: skillsJson), ), - // UI for editing achievements AchievementsEditWidget( achievementsController: TextEditingController(text: achievementsJson), @@ -45,69 +40,3 @@ class EditProfileScreen extends ConsumerWidget { ); } } -// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../provider/user_providers.dart'; -// import '../models/skills.dart'; -// import '../models/achievement.dart'; -// import '../provider/skills_edit_widget.dart'; -// import '../provider/achievements_edit_widget.dart'; -// import 'dart:convert'; - -// class EditProfileScreen extends ConsumerWidget { -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// TextEditingController aboutController = -// TextEditingController(text: ref.watch(aboutProvider) ?? ""); - -// List skills = ref.watch(skillsProvider); -// List achievements = ref.watch(achievementsProvider); - -// String skillsJson = jsonEncode(skills); -// String achievementsJson = jsonEncode(achievements); - -// return Scaffold( -// appBar: AppBar( -// title: const Text('Edit Profile'), -// ), -// body: SingleChildScrollView( -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Edit About', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// fontSize: 20, -// ), -// ), -// TextField( -// controller: aboutController, -// onChanged: (newAbout) { -// // ref.read(aboutProvider).state = newAbout; -// }, -// decoration: const InputDecoration( -// hintText: 'Write something about yourself...', -// ), -// maxLines: 5, -// ), - -// // UI for editing skills -// SkillsEditWidget( -// skillsController: TextEditingController(text: skillsJson), -// ), - -// // UI for editing achievements -// AchievementsEditWidget( -// achievementsController: -// TextEditingController(text: achievementsJson), -// ), -// ], -// ), -// ), -// ), -// ); -// } -// } diff --git a/frontend/lib/screens/home.dart b/frontend/lib/screens/home.dart index fb27441..7ff1127 100644 --- a/frontend/lib/screens/home.dart +++ b/frontend/lib/screens/home.dart @@ -3,7 +3,6 @@ import 'package:go_router/go_router.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../constants/constants.dart'; import '../provider/student_provider.dart'; -// import '../screens/user_profile.dart'; class Home extends ConsumerWidget { const Home({Key? key}); @@ -39,12 +38,6 @@ class Home extends ConsumerWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // const SizedBox(height: 16), - // Text( - // 'Welcome, ${student.name}!', - // style: - // const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), - // ), SizedBox(height: 16), Text('Tap the icon to view your profile.'), ], @@ -54,64 +47,3 @@ class Home extends ConsumerWidget { ); } } - - -// class Home extends ConsumerWidget { -// const Home({Key? key}); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final student = ref.read(studentProvider); - -// return SafeArea( -// child: Scaffold( -// appBar: AppBar( -// title: const Text( -// AppConstants.appName, -// // style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), -// ), -// backgroundColor: Colors.lightBlueAccent, -// ), -// body: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Align( -// alignment: Alignment.centerRight, -// child: Padding( -// padding: const EdgeInsets.only(right: 8.0), -// child: GestureDetector( -// onTap: () { -// context.push('/user_profile'); -// }, -// child: Container( -// width: 50, -// height: 50, -// decoration: const BoxDecoration( -// shape: BoxShape.circle, -// color: Colors.lightBlue, -// ), -// child: const Icon( -// Icons.person, -// color: Colors.white, -// ), -// ), -// ), -// ), -// ), -// const SizedBox(height: 16), -// Text( -// 'Welcome, ${student.name}!', -// style: -// const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), -// ), -// const SizedBox(height: 16), -// const Text('Tap the icon to view your profile.'), -// ], -// ), -// ), -// ), -// ); -// } -// } diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart index 5eefe01..bd3e73c 100644 --- a/frontend/lib/screens/user_profile.dart +++ b/frontend/lib/screens/user_profile.dart @@ -119,15 +119,7 @@ class UserProfile extends ConsumerWidget { ), ), const SizedBox(height: 5), - // const Text( - // 'scroll right >> ', - // style: TextStyle( - // fontWeight: FontWeight.w100, - // fontSize: 12, - // ), - // ), - // Display Skills as separate pie charts if (currentStudent?.skills != null) Column( children: [ From 7472a8c6b27eafcd40e5cb713e1667fc08465b51 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Tue, 13 Feb 2024 10:59:38 +0530 Subject: [PATCH 20/29] build_apk updated --- .github/workflows/flutter_build_apk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter_build_apk.yml b/.github/workflows/flutter_build_apk.yml index 7176d02..5a97512 100644 --- a/.github/workflows/flutter_build_apk.yml +++ b/.github/workflows/flutter_build_apk.yml @@ -38,4 +38,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: release-apk - path: frontend/build/app/outputs/apk/release/app-release.apk + path: frontend/build/app/outputs/apk/release/app-release.apk \ No newline at end of file From cca6fec17b911def4f568567b48f4821fb892d63 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Tue, 13 Feb 2024 13:14:07 +0530 Subject: [PATCH 21/29] routes modified --- frontend/lib/routes/routes.dart | 148 ++++++++++++++++++++------------ 1 file changed, 93 insertions(+), 55 deletions(-) diff --git a/frontend/lib/routes/routes.dart b/frontend/lib/routes/routes.dart index ea9bc91..99f4f35 100644 --- a/frontend/lib/routes/routes.dart +++ b/frontend/lib/routes/routes.dart @@ -12,20 +12,21 @@ import '../screens/admin/add_menu.dart'; import '../screens/admin/view_courses.dart'; import '../screens/admin/view_faculty.dart'; import '../screens/admin/view_menu.dart'; +import '../screens/room_vacancy.dart'; import '../screens/user_profile.dart'; -import '../screens/home.dart'; -import '../screens/auth/admin_login.dart'; -import '../screens/auth/user_login.dart'; import '../screens/auth/signin_page.dart'; -import '../screens/room_vacancy.dart'; final GoRouter routes = GoRouter( - initialLocation: '/home', routes: [ GoRoute( path: '/', - pageBuilder: (context, state) => MaterialPage(child: SignIn()), + pageBuilder: (context, state) => const MaterialPage(child: Home()), routes: [ + GoRoute( + path: 'user_profile', + pageBuilder: (context, state) => + const MaterialPage(child: UserProfile()), + ), GoRoute( path: 'admin_home', pageBuilder: (context, state) => @@ -80,71 +81,108 @@ final GoRouter routes = GoRouter( ), ], ), - GoRoute( - path: '/home', - pageBuilder: (context, state) => const MaterialPage(child: Home()), - routes: [ - GoRoute( - path: 'classroom_vacancy', - pageBuilder: (context, state) => const MaterialPage(child: RoomVacancy()), - ), - GoRoute( - path: 'lost_and_found', - pageBuilder: (context, state) => MaterialPage(child: LostAndFound()), - ), - GoRoute( - path: 'user_profile', - pageBuilder: (context, state) => - const MaterialPage(child: UserProfile()), - ), - ], - ), ], ); +// import 'package:flutter/material.dart'; +// import 'package:go_router/go_router.dart'; +// import 'package:smart_insti_app/screens/admin/add_courses.dart'; +// import 'package:smart_insti_app/screens/admin/add_students.dart'; +// import 'package:smart_insti_app/screens/admin/admin_home.dart'; +// import 'package:smart_insti_app/screens/admin/manage_rooms.dart'; +// import 'package:smart_insti_app/screens/admin/view_students.dart'; +// import 'package:smart_insti_app/screens/home.dart'; +// import 'package:smart_insti_app/screens/lost_and_found.dart'; +// import '../screens/admin/add_faculty.dart'; +// import '../screens/admin/add_menu.dart'; +// import '../screens/admin/view_courses.dart'; +// import '../screens/admin/view_faculty.dart'; +// import '../screens/admin/view_menu.dart'; +// import '../screens/user_profile.dart'; +// import '../screens/home.dart'; +// import '../screens/auth/admin_login.dart'; +// import '../screens/auth/user_login.dart'; +// import '../screens/auth/signin_page.dart'; +// import '../screens/room_vacancy.dart'; // final GoRouter routes = GoRouter( +// initialLocation: '/home', // routes: [ // GoRoute( // path: '/', -// pageBuilder: (context, state) => const MaterialPage(child: AdminHome()), +// pageBuilder: (context, state) => MaterialPage(child: SignIn()), // routes: [ // GoRoute( -// path: 'add_students', -// pageBuilder: (context, state) => MaterialPage(child: AddStudents()), -// ), -// GoRoute( -// path: 'add_faculty', -// pageBuilder: (context, state) => MaterialPage(child: AddFaculty()), -// ), -// GoRoute( -// path: 'add_courses', -// pageBuilder: (context, state) => MaterialPage(child: AddCourses()), -// ), -// GoRoute( -// path: 'view_students', -// pageBuilder: (context, state) => MaterialPage(child: ViewStudents()), -// ), -// GoRoute( -// path: 'view_faculty', -// pageBuilder: (context, state) => MaterialPage(child: ViewFaculty()), +// path: 'admin_home', +// pageBuilder: (context, state) => +// const MaterialPage(child: AdminHome()), +// routes: [ +// GoRoute( +// path: 'add_students', +// pageBuilder: (context, state) => +// MaterialPage(child: AddStudents()), +// ), +// GoRoute( +// path: 'add_faculty', +// pageBuilder: (context, state) => +// MaterialPage(child: AddFaculty()), +// ), +// GoRoute( +// path: 'add_courses', +// pageBuilder: (context, state) => +// MaterialPage(child: AddCourses()), +// ), +// GoRoute( +// path: 'view_students', +// pageBuilder: (context, state) => +// MaterialPage(child: ViewStudents()), +// ), +// GoRoute( +// path: 'view_faculty', +// pageBuilder: (context, state) => +// MaterialPage(child: ViewFaculty()), +// ), +// GoRoute( +// path: 'view_courses', +// pageBuilder: (context, state) => +// MaterialPage(child: ViewCourses()), +// ), +// GoRoute( +// path: 'add_menu', +// pageBuilder: (context, state) => +// MaterialPage(child: AddMessMenu()), +// ), +// GoRoute( +// path: 'view_menu', +// pageBuilder: (context, state) => +// MaterialPage(child: ViewMessMenu()), +// ), +// GoRoute( +// path: 'manage_rooms', +// pageBuilder: (context, state) => +// MaterialPage(child: ManageRooms()), +// ) +// ], // ), +// ], +// ), +// GoRoute( +// path: '/home', +// pageBuilder: (context, state) => const MaterialPage(child: Home()), +// routes: [ // GoRoute( -// path: 'view_courses', -// pageBuilder: (context, state) => MaterialPage(child: ViewCourses()), +// path: 'classroom_vacancy', +// pageBuilder: (context, state) => const MaterialPage(child: RoomVacancy()), // ), // GoRoute( -// path: 'add_menu', -// pageBuilder: (context, state) => MaterialPage(child: AddMessMenu()), +// path: 'lost_and_found', +// pageBuilder: (context, state) => MaterialPage(child: LostAndFound()), // ), // GoRoute( -// path: 'view_menu', -// pageBuilder: (context, state) => MaterialPage(child: ViewMessMenu()), +// path: 'user_profile', +// pageBuilder: (context, state) => +// const MaterialPage(child: UserProfile()), // ), -// GoRoute( -// path: 'manage_rooms', -// pageBuilder: (context, state) => MaterialPage(child: ManageRooms()), -// ) // ], -// ) +// ), // ], // ); From ce9a8bf986cfcac2d49cc1d7670be18876a6f5fc Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Tue, 13 Feb 2024 13:18:06 +0530 Subject: [PATCH 22/29] .env file added --- .env | 1 + 1 file changed, 1 insertion(+) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..d20fa3e --- /dev/null +++ b/.env @@ -0,0 +1 @@ +BACKEND_DOMAIN='http://10.0.2.2:3000' \ No newline at end of file From 33a50dab598b67734a76aa4d8cc6ed3cd8e68e90 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Wed, 14 Feb 2024 15:56:25 +0530 Subject: [PATCH 23/29] backend configured --- .env | 1 - backend/package-lock.json | 2380 +++++++++++++++++++++++++++++++++++++ backend/yarn.lock | 44 +- 3 files changed, 2392 insertions(+), 33 deletions(-) delete mode 100644 .env create mode 100644 backend/package-lock.json diff --git a/.env b/.env deleted file mode 100644 index d20fa3e..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -BACKEND_DOMAIN='http://10.0.2.2:3000' \ No newline at end of file diff --git a/backend/package-lock.json b/backend/package-lock.json new file mode 100644 index 0000000..e0e45a7 --- /dev/null +++ b/backend/package-lock.json @@ -0,0 +1,2380 @@ +{ + "name": "server", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "server", + "version": "0.0.0", + "license": "MIT", + "dependencies": { + "bcryptjs": "^2.4.3", + "body-parser": "^1.20.2", + "cookie-parser": "~1.4.4", + "cors": "^2.8.5", + "debug": "^4.3.4", + "dotenv": "^16.3.2", + "express": "~4.16.1", + "http-errors": "~1.6.3", + "jsonwebtoken": "^9.0.2", + "mongoose": "^8.1.0", + "morgan": "~1.9.1", + "multer": "^1.4.5-lts.1", + "nodemailer": "^6.9.8", + "nodemon": "^3.0.3", + "pug": "2.0.0-beta11", + "xoauth2": "^1.2.0", + "yarn": "^1.22.21" + } + }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz", + "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, + "node_modules/@types/babel-types": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.15.tgz", + "integrity": "sha512-JUgfZHUOMbtjopxiOQaaF+Uovk5wpDqpXR+XLWiOivCWSy1FccO30lvNNpCt8geFwq8VmGT2y9OMkOpA0g5O5g==" + }, + "node_modules/@types/babylon": { + "version": "6.16.9", + "resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.9.tgz", + "integrity": "sha512-sEKyxMVEowhcr8WLfN0jJYe4gS4Z9KC2DGz0vqfC7+MXFbmvOF7jSjALC77thvAO2TLgFUPa9vDeOak+AcUrZA==", + "dependencies": { + "@types/babel-types": "*" + } + }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" + }, + "node_modules/@types/whatwg-url": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz", + "integrity": "sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==", + "dependencies": { + "@types/webidl-conversions": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha512-uWttZCk96+7itPxK8xCzY86PnxKTMrReKDqrHzv42VQY0K30PUO8WY13WMOuI+cOdX4EIdzdvQ8k6jkuGRFMYw==", + "dependencies": { + "acorn": "^4.0.4" + } + }, + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", + "dependencies": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "node_modules/babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "bin": { + "babylon": "bin/babylon.js" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/body-parser/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/body-parser/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bson": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz", + "integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==", + "engines": { + "node": ">=16.20.1" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/character-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", + "integrity": "sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==", + "dependencies": { + "is-regex": "^1.0.3" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/clean-css": { + "version": "3.4.28", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz", + "integrity": "sha512-aTWyttSdI2mYi07kWqHi24NUU9YlELFKGOAgFzZjDN1064DMAOy2FBuoyGmkKRlXkbpXd0EVHmiVkbKhKoirTw==", + "dependencies": { + "commander": "2.8.x", + "source-map": "0.4.x" + }, + "bin": { + "cleancss": "bin/cleancss" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/commander": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "integrity": "sha512-+pJLBFVk+9ZZdlAOB5WuIElVPPth47hILFkmGym57aq8kwxsowvByvB0DHs1vQAhyMZzdcpTtF0VDKGkSDR4ZQ==", + "dependencies": { + "graceful-readlink": ">= 1.0.0" + }, + "engines": { + "node": ">= 0.6.x" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/constantinople": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz", + "integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==", + "dependencies": { + "@types/babel-types": "^7.0.0", + "@types/babylon": "^6.16.2", + "babel-types": "^6.26.0", + "babylon": "^6.18.0" + } + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-parser": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", + "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", + "dependencies": { + "cookie": "0.4.1", + "cookie-signature": "1.0.6" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/doctypes": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", + "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==" + }, + "node_modules/dotenv": { + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", + "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "dependencies": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha512-YQyoqQG3sO8iCmf8+hyVpgHHOv0/hCEFiS4zTGUwTA1HjAFX66wRcNQrVCeJq9pgESMRvUAOvSil5MJlmccuKQ==", + "dependencies": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/express/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "dependencies": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/finalhandler/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w==" + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-expression": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz", + "integrity": "sha512-vyMeQMq+AiH5uUnoBfMTwf18tO3bM6k1QXBE9D6ueAAquEfCZe3AJPtud9g6qS0+4X8xA7ndpZiDyeb2l2qOBw==", + "dependencies": { + "acorn": "~4.0.2", + "object-assign": "^4.0.1" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/js-stringify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", + "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==" + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jstransformer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", + "integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==", + "dependencies": { + "is-promise": "^2.0.0", + "promise": "^7.0.1" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/kareem": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", + "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "bin": { + "mime": "cli.js" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mongodb": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.3.0.tgz", + "integrity": "sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA==", + "dependencies": { + "@mongodb-js/saslprep": "^1.1.0", + "bson": "^6.2.0", + "mongodb-connection-string-url": "^3.0.0" + }, + "engines": { + "node": ">=16.20.1" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz", + "integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==", + "dependencies": { + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^13.0.0" + } + }, + "node_modules/mongoose": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.1.1.tgz", + "integrity": "sha512-DbLb0NsiEXmaqLOpEz+AtAsgwhRw6f25gwa1dF5R7jj6lS1D8X6uTdhBSC8GDVtOwe5Tfw2EL7nTn6hiJT3Bgg==", + "dependencies": { + "bson": "^6.2.0", + "kareem": "2.5.1", + "mongodb": "6.3.0", + "mpath": "0.9.0", + "mquery": "5.0.0", + "ms": "2.1.3", + "sift": "16.0.1" + }, + "engines": { + "node": ">=16.20.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mongoose" + } + }, + "node_modules/mongoose/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/morgan": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", + "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", + "dependencies": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.2", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/morgan/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/morgan/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/morgan/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/mpath": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mquery": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "dependencies": { + "debug": "4.x" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/multer": { + "version": "1.4.5-lts.1", + "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz", + "integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.0.0", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.4", + "object-assign": "^4.1.1", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nodemailer": { + "version": "6.9.8", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.8.tgz", + "integrity": "sha512-cfrYUk16e67Ks051i4CntM9kshRYei1/o/Gi8K1d+R34OIs21xdFnW7Pt7EucmVKA0LKtqUGNcjMZ7ehjl49mQ==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/nodemon": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.3.tgz", + "integrity": "sha512-7jH/NXbFPxVaMwmBCC2B9F/V6X1VkEdNgx3iu9jji8WxWcvhMWkmhNWhI5077zknOnZnBzba9hZP6bCPJLSReQ==", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dependencies": { + "asap": "~2.0.3" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" + }, + "node_modules/pug": { + "version": "2.0.0-beta11", + "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.0-beta11.tgz", + "integrity": "sha512-iV0ibDCWLJGw8eEtBKAqbJZecOabQa6hpFeH+GCBzsAsCNSvpjo4wuHMPcmqtaZhxoO3ElbMePf8jkrM9TKulw==", + "dependencies": { + "pug-code-gen": "^1.1.1", + "pug-filters": "^2.1.1", + "pug-lexer": "^3.0.0", + "pug-linker": "^2.0.2", + "pug-load": "^2.0.5", + "pug-parser": "^2.0.2", + "pug-runtime": "^2.0.3", + "pug-strip-comments": "^1.0.2" + } + }, + "node_modules/pug-attrs": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.4.tgz", + "integrity": "sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==", + "dependencies": { + "constantinople": "^3.0.1", + "js-stringify": "^1.0.1", + "pug-runtime": "^2.0.5" + } + }, + "node_modules/pug-code-gen": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-1.1.1.tgz", + "integrity": "sha512-UwZaJVhjhy2kYntLqXjSV1ae+K96ve6bG+N5bLFfA6yyGJTEkguct19MWDyUM9D8CDU3NNxVctUAh5McF19E6w==", + "dependencies": { + "constantinople": "^3.0.1", + "doctypes": "^1.1.0", + "js-stringify": "^1.0.1", + "pug-attrs": "^2.0.2", + "pug-error": "^1.3.2", + "pug-runtime": "^2.0.3", + "void-elements": "^2.0.1", + "with": "^5.0.0" + } + }, + "node_modules/pug-error": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz", + "integrity": "sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==" + }, + "node_modules/pug-filters": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-2.1.5.tgz", + "integrity": "sha512-xkw71KtrC4sxleKiq+cUlQzsiLn8pM5+vCgkChW2E6oNOzaqTSIBKIQ5cl4oheuDzvJYCTSYzRaVinMUrV4YLQ==", + "dependencies": { + "clean-css": "^3.3.0", + "constantinople": "^3.0.1", + "jstransformer": "1.0.0", + "pug-error": "^1.3.2", + "pug-walk": "^1.1.5", + "resolve": "^1.1.6", + "uglify-js": "^2.6.1" + } + }, + "node_modules/pug-lexer": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-3.1.0.tgz", + "integrity": "sha512-DxXOrmCIDVEwzN2ozZBK1t4QRTR6pLv5YkqM6dLdaSHnm+LJJRBngVn4IDMMBZQR9xUpxrRm9rffmku2OEqkJw==", + "dependencies": { + "character-parser": "^2.1.1", + "is-expression": "^3.0.0", + "pug-error": "^1.3.2" + } + }, + "node_modules/pug-linker": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-2.0.3.tgz", + "integrity": "sha512-ZqKljvFUl1K5L4G5WABJ5FUYWOY0K2AXLmwj2QfM7nPCUcxfsmr05SikjgXGXVoIrygGzM/iWSsXwnkWId4AHw==", + "dependencies": { + "pug-error": "^1.3.2", + "pug-walk": "^1.1.2" + } + }, + "node_modules/pug-load": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.12.tgz", + "integrity": "sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg==", + "dependencies": { + "object-assign": "^4.1.0", + "pug-walk": "^1.1.8" + } + }, + "node_modules/pug-parser": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-2.0.2.tgz", + "integrity": "sha512-PW8kKDLN07MbFljR/GaYHPBGW+64YldtFFZUEGltJ67RRzebI/DxZy4njlxacy9JeheosyVprZ9C5DIexG1D/Q==", + "dependencies": { + "pug-error": "^1.3.2", + "token-stream": "0.0.1" + } + }, + "node_modules/pug-runtime": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz", + "integrity": "sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==" + }, + "node_modules/pug-strip-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz", + "integrity": "sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw==", + "dependencies": { + "pug-error": "^1.3.3" + } + }, + "node_modules/pug-walk": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz", + "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/raw-body/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/raw-body/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "dependencies": { + "align-text": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/send/node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==" + }, + "node_modules/send/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", + "dependencies": { + "define-data-property": "^1.1.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sift": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "dependencies": { + "memory-pager": "^1.0.2" + } + }, + "node_modules/statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/token-stream": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz", + "integrity": "sha512-nfjOAu/zAWmX9tgwi5NRp7O7zTDUD1miHiB40klUnAh9qnL1iXdgzcz/i5dMaL5jahcBAaSfmNOBBJBLJW8TEg==" + }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/tr46": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "dependencies": { + "punycode": "^2.3.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "node_modules/uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "dependencies": { + "source-map": "~0.5.1", + "yargs": "~3.10.0" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + }, + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + } + }, + "node_modules/uglify-js/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "optional": true + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", + "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", + "dependencies": { + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/with": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz", + "integrity": "sha512-uAnSsFGfSpF6DNhBXStvlZILfHJfJu4eUkfbRGk94kGO1Ta7bg6FwfvoOhhyHAJuFbCw+0xk4uJ3u57jLvlCJg==", + "dependencies": { + "acorn": "^3.1.0", + "acorn-globals": "^3.0.0" + } + }, + "node_modules/with/node_modules/acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/xoauth2": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/xoauth2/-/xoauth2-1.2.0.tgz", + "integrity": "sha512-hKuNbkj3q/ifCcfWnW6KURP+6ExSuLdLG007gasNhMEMKlLaejNkIA6eu5Ol1xPP0/kzTuA87XHDaAcUw5k73Q==" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + }, + "node_modules/yarn": { + "version": "1.22.21", + "resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.21.tgz", + "integrity": "sha512-ynXaJsADJ9JiZ84zU25XkPGOvVMmZ5b7tmTSpKURYwgELdjucAOydqIOrOfTxVYcNXe91xvLZwcRh68SR3liCg==", + "hasInstallScript": true, + "bin": { + "yarn": "bin/yarn.js", + "yarnpkg": "bin/yarn.js" + }, + "engines": { + "node": ">=4.0.0" + } + } + } +} diff --git a/backend/yarn.lock b/backend/yarn.lock index bf6b431..5b45435 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -526,11 +526,6 @@ fresh@0.5.2: resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -641,16 +636,16 @@ ignore-by-default@^1.0.1: resolved "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz" integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== -inherits@^2.0.3, inherits@~2.0.3, inherits@2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: +inherits@^2.0.3, inherits@~2.0.3, inherits@2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== +inherits@2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" @@ -942,21 +937,16 @@ mquery@5.0.0: dependencies: debug "4.x" -ms@^2.1.1: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +ms@^2.1.1, ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - ms@2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" @@ -1280,12 +1270,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -safe-buffer@^5.0.1: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@5.1.2: +safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -1392,12 +1377,7 @@ sparse-bitfield@^3.0.3: dependencies: memory-pager "^1.0.2" -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" - integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== - -statuses@~1.4.0: +"statuses@>= 1.4.0 < 2", statuses@~1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz" integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== From 99d66b902fb1c307a69bae1c77cf3226d26538b2 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Wed, 14 Feb 2024 15:56:44 +0530 Subject: [PATCH 24/29] routes configured --- frontend/lib/routes/routes.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/lib/routes/routes.dart b/frontend/lib/routes/routes.dart index aad5949..4cdf53c 100644 --- a/frontend/lib/routes/routes.dart +++ b/frontend/lib/routes/routes.dart @@ -14,8 +14,7 @@ import '../screens/admin/admin_profile.dart'; import '../screens/admin/view_courses.dart'; import '../screens/admin/view_faculty.dart'; import '../screens/admin/view_menu.dart'; -import '../screens/room_vacancy.dart'; -import '../screens/user_profile.dart'; +import '../screens/user/room_vacancy.dart'; import '../screens/auth/admin_login.dart'; import '../screens/user/room_vacancy.dart'; import '../screens/user/user_home.dart'; @@ -23,7 +22,7 @@ import '../screens/user/faculty_profile.dart'; import '../screens/user/student_profile.dart'; final GoRouter routes = GoRouter( - initialLocation: '/', + initialLocation: '/user_home/student_profile', routes: [ GoRoute( path: '/', From b7175de9781cdd3a37d1cd57f320a09b84da70d1 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Wed, 14 Feb 2024 15:57:01 +0530 Subject: [PATCH 25/29] home.dart to user_home.dart --- frontend/lib/screens/home.dart | 68 ---------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 frontend/lib/screens/home.dart diff --git a/frontend/lib/screens/home.dart b/frontend/lib/screens/home.dart deleted file mode 100644 index 99b5a1c..0000000 --- a/frontend/lib/screens/home.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:flutter/material.dart'; -import '../provider/student_provider.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:go_router/go_router.dart'; -import 'package:smart_insti_app/components/menu_tile.dart'; -import '../constants/constants.dart'; -import '../provider/room_provider.dart'; - -class Home extends ConsumerWidget { - const Home({super.key}); - - @override - Widget build(BuildContext context, WidgetRef ref) { - return SafeArea( - child: Scaffold( - appBar: AppBar( - title: const Text( - AppConstants.appName, - ), - backgroundColor: Colors.lightBlueAccent, - actions: [ - IconButton( - icon: const Icon(Icons.person), - onPressed: () { - context.push('/user_profile'); - }, - ), - IconButton( - icon: const Icon(Icons.admin_panel_settings), - onPressed: () { - context.push('/admin_home'); - }, - ), - ], - ), - body: GridView.count( - padding: const EdgeInsets.all(10), - crossAxisCount: 2, - children: [ - MenuTile( - title: 'Room\nVacancy', - onTap: () => context.push('/home/classroom_vacancy'), - body: [ - const SizedBox(height: 5), - Consumer( - builder: (_, ref, __) => Text( - '${ref.read(roomProvider.notifier).getVacantCount()} Vacant', - textAlign: TextAlign.center, - style: const TextStyle(fontSize: 14), - ), - ), - ], - icon: Icons.class_, - primaryColor: Colors.lightBlueAccent.shade100, - secondaryColor: Colors.lightBlueAccent.shade200, - ), - MenuTile( - title: "Lost\n&\nFound", - onTap: () => context.push('/home/lost_and_found'), - primaryColor: Colors.orangeAccent.shade100, - secondaryColor: Colors.orangeAccent.shade200, - icon: Icons.search), - ], - ), - ), - ); - } -} From bc128c8964dd2c2f378621ae322c15bcecbb98fd Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Wed, 14 Feb 2024 15:57:15 +0530 Subject: [PATCH 26/29] user_profile.dart to student_profile.dart --- .../lib/screens/user/student_profile.dart | 402 +++++++++++++++--- frontend/lib/screens/user_profile.dart | 275 ------------ 2 files changed, 339 insertions(+), 338 deletions(-) delete mode 100644 frontend/lib/screens/user_profile.dart diff --git a/frontend/lib/screens/user/student_profile.dart b/frontend/lib/screens/user/student_profile.dart index 48e4933..38a5335 100644 --- a/frontend/lib/screens/user/student_profile.dart +++ b/frontend/lib/screens/user/student_profile.dart @@ -1,78 +1,354 @@ +import 'dart:math'; +import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:smart_insti_app/models/achievement.dart'; +import 'package:smart_insti_app/models/student.dart'; import 'package:smart_insti_app/provider/auth_provider.dart'; -import '../../constants/constants.dart'; -import '../../models/student.dart'; +import '../edit_profile.dart'; +import 'package:smart_insti_app/constants/dummy_entries.dart'; class StudentProfile extends ConsumerWidget { - const StudentProfile({super.key}); + const StudentProfile({Key? key}) : super(key: key); @override Widget build(BuildContext context, WidgetRef ref) { - WidgetsBinding.instance.addPostFrameCallback((_) { - if (ref.read(authProvider.notifier).tokenCheckProgress != LoadingState.progress && context.mounted) { - ref.read(authProvider.notifier).verifyAuthTokenExistence(context, AuthConstants.generalAuthLabel.toLowerCase()); - } - }); + final auth = ref.read(authProvider); - final Student currentStudent = ref.read(authProvider).currentUser as Student; - return Card( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Name: ${currentStudent.name}', - style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), - ), - SizedBox(height: 10), - Text( - 'Email: ${currentStudent.email}', - style: TextStyle(fontSize: 16), - ), - SizedBox(height: 10), - Text( - 'Branch: ${currentStudent.branch}', - style: TextStyle(fontSize: 16), - ), - SizedBox(height: 10), - Text( - 'Graduation Year: ${currentStudent.graduationYear}', - style: TextStyle(fontSize: 16), - ), - SizedBox(height: 10), - Text( - 'About: ${currentStudent.about}', - style: TextStyle(fontSize: 16), - ), - SizedBox(height: 10), - Text( - 'Roles: ${currentStudent.roles!.join(', ')}', - style: TextStyle(fontSize: 16), + final currentStudent = auth.currentUser as Student?; + + if (currentStudent == null) { + return Scaffold( + appBar: AppBar( + title: const Text('Student Profile'), + ), + body: Center( + child: Text('No student data available'), + ), + ); + } + + return Scaffold( + appBar: AppBar( + title: const Text('Student Profile'), + actions: [ + IconButton( + icon: const Icon(Icons.edit), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => EditProfileScreen()), + ); + }, ), - SizedBox(height: 10), - Column( - children: currentStudent.skills!.map((skill) { - return Column(children: [ - Text('Achievement: ${skill.name}'), - Text('Year: ${skill.level}'), - ]); - }).toList(), + ], + ), + body: SingleChildScrollView( + child: Container( + color: Colors.lightBlueAccent, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + CircleAvatar( + backgroundImage: currentStudent.profilePicURI != null + ? NetworkImage(currentStudent.profilePicURI!) + : const AssetImage('assets/openlake.png') + as ImageProvider, + radius: 55, + child: currentStudent.profilePicURI == null + ? const Icon( + Icons.person, + size: 55, + color: Colors.grey, + ) + : null, + ), + const SizedBox(height: 8), + Text( + currentStudent.name ?? '', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 18, + ), + ), + const SizedBox(height: 8), + Card( + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.0), + ), + elevation: 5, + child: Container( + constraints: BoxConstraints( + minHeight: MediaQuery.of(context).size.height * 0.6, + ), + child: IntrinsicHeight( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + buildInfoRow("ID", currentStudent.rollNumber ?? ''), + buildInfoRow("Email", currentStudent.email ?? ''), + buildInfoRow("Branch", currentStudent.branch ?? ''), + buildInfoRow( + "Class of", + "${currentStudent.graduationYear}" ?? '', + ), + const SizedBox(height: 16), + const Text( + 'About:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + Text(currentStudent.about ?? 'No information'), + const SizedBox(height: 5), + const Text( + 'Roles: ', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + Text( + '${currentStudent.roles?.join(", ") ?? "No roles"}', + ), + const SizedBox(height: 16), + const Text( + 'Skills:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 5), + if (currentStudent.skills != null) + Column( + children: [ + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: currentStudent.skills! + .map( + (skill) => SizedBox( + width: 105, + height: 80, + child: PieChart( + PieChartData( + sections: [ + PieChartSectionData( + value: skill.level + .toDouble(), + title: skill.name ?? '', + color: getRandomColor(), + ), + PieChartSectionData( + value: (100 - skill.level) + .toDouble(), + title: '', + color: Color.fromARGB( + 255, 184, 212, 240), + ), + ], + sectionsSpace: 0, + centerSpaceRadius: 0, + borderData: FlBorderData( + show: false, + ), + ), + ), + ), + ) + .toList(), + ), + ), + const SizedBox(height: 10), + Slider( + value: 10, + onChanged: (double value) {}, + min: 0, + max: 100, + ), + ], + ), + const SizedBox(height: 5), + const Text( + 'Achievements:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: currentStudent.achievements + ?.map( + (achievement) => SizedBox( + width: (MediaQuery.of(context) + .size + .width - + 48 - + 40) / + 2, + child: buildAchievementCard( + achievement), + ), + ) + .toList() ?? + [], + ), + ), + const SizedBox(height: 10), + Slider( + value: 10, + onChanged: (double value) {}, + min: 0, + max: 100, + divisions: 5, + label: 'Achievement Slider', + ), + ], + ), + ), + ), + ), + ), + ], + ), ), - SizedBox(height: 10), - Column( - children: currentStudent.achievements!.map((achievement) { - return Column(children: [ - Text('Achievement: ${achievement.name}'), - Text('Year: ${achievement.date}'), - Text('Description: ${achievement.description}'), - ]); - }).toList(), + ), + ), + ); + } + + Widget buildInfoRow(String title, String value) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + title, + style: const TextStyle( + fontWeight: FontWeight.bold, ), - ], + ), + Text(value), + ], + ); + } + + Widget buildAchievementCard(Achievement achievement) { + return Card( + color: Colors.lightBlue, + elevation: 3, + margin: const EdgeInsets.symmetric(vertical: 8), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + achievement.name ?? '', + style: const TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + Text( + 'Date: ${achievement.date}', + style: const TextStyle(fontSize: 12), + ), + Text( + achievement.description ?? '', + style: const TextStyle(fontSize: 12), + ), + ], + ), ), - )); + ); + } + + Color getRandomColor() { + return Colors.primaries[Random().nextInt(Colors.primaries.length)]; } } + + +// import 'package:flutter/material.dart'; +// import 'package:flutter/widgets.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import 'package:smart_insti_app/provider/auth_provider.dart'; +// import '../../constants/constants.dart'; +// import '../../models/student.dart'; + +// class StudentProfile extends ConsumerWidget { +// const StudentProfile({super.key}); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// WidgetsBinding.instance.addPostFrameCallback((_) { +// if (ref.read(authProvider.notifier).tokenCheckProgress != LoadingState.progress && context.mounted) { +// ref.read(authProvider.notifier).verifyAuthTokenExistence(context, AuthConstants.generalAuthLabel.toLowerCase()); +// } +// }); + +// final Student currentStudent = ref.read(authProvider).currentUser as Student; +// return Card( +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// 'Name: ${currentStudent.name}', +// style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), +// ), +// SizedBox(height: 10), +// Text( +// 'Email: ${currentStudent.email}', +// style: TextStyle(fontSize: 16), +// ), +// SizedBox(height: 10), +// Text( +// 'Branch: ${currentStudent.branch}', +// style: TextStyle(fontSize: 16), +// ), +// SizedBox(height: 10), +// Text( +// 'Graduation Year: ${currentStudent.graduationYear}', +// style: TextStyle(fontSize: 16), +// ), +// SizedBox(height: 10), +// Text( +// 'About: ${currentStudent.about}', +// style: TextStyle(fontSize: 16), +// ), +// SizedBox(height: 10), +// Text( +// 'Roles: ${currentStudent.roles!.join(', ')}', +// style: TextStyle(fontSize: 16), +// ), +// SizedBox(height: 10), +// Column( +// children: currentStudent.skills!.map((skill) { +// return Column(children: [ +// Text('Achievement: ${skill.name}'), +// Text('Year: ${skill.level}'), +// ]); +// }).toList(), +// ), +// SizedBox(height: 10), +// Column( +// children: currentStudent.achievements!.map((achievement) { +// return Column(children: [ +// Text('Achievement: ${achievement.name}'), +// Text('Year: ${achievement.date}'), +// Text('Description: ${achievement.description}'), +// ]); +// }).toList(), +// ), +// ], +// ), +// )); +// } +// } diff --git a/frontend/lib/screens/user_profile.dart b/frontend/lib/screens/user_profile.dart deleted file mode 100644 index bd3e73c..0000000 --- a/frontend/lib/screens/user_profile.dart +++ /dev/null @@ -1,275 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fl_chart/fl_chart.dart'; -import 'dart:math'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import '../screens/edit_profile.dart'; -import '../provider/student_provider.dart'; -import '../models/achievement.dart'; -import '../models/student.dart'; - -class UserProfile extends ConsumerWidget { - const UserProfile({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final student = ref.read(studentProvider); - final Student? currentStudent = student.getStudentById('1'); - - return Scaffold( - appBar: AppBar( - title: const Text('User Profile'), - actions: [ - IconButton( - icon: const Icon(Icons.edit), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => EditProfileScreen()), - ); - }, - ), - ], - ), - body: SingleChildScrollView( - child: Container( - color: Colors.lightBlueAccent, - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - CircleAvatar( - backgroundImage: currentStudent?.profilePicURI != null - ? NetworkImage(currentStudent!.profilePicURI!) - : const AssetImage('assets/openlake.png') - as ImageProvider, - radius: 55, - child: currentStudent?.profilePicURI == null - ? const Icon( - Icons.person, - size: 55, - color: Colors.grey, - ) - : null, - ), - - const SizedBox(height: 8), - - Text( - currentStudent?.name ?? '', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 18, - ), - ), - - const SizedBox(height: 8), - - // User Details Card - Card( - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20.0), - ), - elevation: 5, - child: Container( - constraints: BoxConstraints( - minHeight: MediaQuery.of(context).size.height * 0.6, - ), - child: IntrinsicHeight( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildInfoRow( - "ID", currentStudent?.rollNumber ?? ''), - buildInfoRow("Email", currentStudent?.email ?? ''), - buildInfoRow( - "Branch", currentStudent?.branch ?? ''), - buildInfoRow("Class of", - "${currentStudent?.graduationYear}" ?? ''), - const SizedBox(height: 16), - const Text( - 'About:', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - ), - Text(currentStudent?.about ?? 'No information'), - - const SizedBox(height: 5), - - const Text( - 'Roles: ', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - ), - Text( - '${currentStudent?.roles?.join(", ") ?? "No roles"}'), - // style: TextStyle(),) - - const SizedBox(height: 16), - - const Text( - 'Skills:', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - ), - const SizedBox(height: 5), - - if (currentStudent?.skills != null) - Column( - children: [ - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: currentStudent!.skills! - .map( - (skill) => SizedBox( - width: 105, - height: 80, - child: PieChart( - PieChartData( - sections: [ - PieChartSectionData( - value: skill.level - .toDouble(), - title: skill.name, - color: getRandomColor(), - ), - PieChartSectionData( - value: (100 - skill.level) - .toDouble(), - title: '', - color: Color.fromARGB( - 255, 184, 212, 240), - ), - ], - sectionsSpace: 0, - centerSpaceRadius: 0, - borderData: FlBorderData( - show: false, - ), - ), - ), - ), - ) - .toList(), - ), - ), - const SizedBox(height: 10), - Slider( - value: 10, - onChanged: (double value) {}, - min: 0, - max: 100, - ), - ], - ), - - const SizedBox(height: 5), - - const Text( - 'Achievements:', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - ), - - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: currentStudent?.achievements - ?.map( - (achievement) => SizedBox( - width: (MediaQuery.of(context) - .size - .width - - 48 - - 40) / - 2, - child: buildAchievementCard( - achievement), - ), - ) - .toList() ?? - [], - ), - ), - const SizedBox(height: 10), - Slider( - value: 10, - onChanged: (double value) {}, - min: 0, - max: 100, - divisions: 5, - label: 'Achievement Slider', - ), - ], - ), - ), - ), - ), - ), - ], - ), - ), - ), - ), - ); - } - - Widget buildInfoRow(String title, String value) { - return Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - title, - style: const TextStyle( - fontWeight: FontWeight.bold, - ), - ), - Text(value), - ], - ); - } - - Widget buildAchievementCard(Achievement achievement) { - return Card( - color: Colors.lightBlue, - elevation: 3, - margin: const EdgeInsets.symmetric(vertical: 8), - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - achievement.name, - style: const TextStyle( - fontWeight: FontWeight.bold, - fontSize: 15, - ), - ), - // const SizedBox(height: 8), - Text( - 'Date: ${achievement.date}', - style: const TextStyle(fontSize: 12), - ), - Text( - achievement.description, - style: const TextStyle(fontSize: 12), - ), - ], - ), - ), - ); - } - - Color getRandomColor() { - return Colors.primaries[Random().nextInt(Colors.primaries.length)]; - } -} From 010dba86a3446b7901e86cd8fe73ef0378952220 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Wed, 14 Feb 2024 16:11:47 +0530 Subject: [PATCH 27/29] providers and edit profile updated --- frontend/lib/provider/about_Edit_widget.dart | 61 +++++++- .../provider/achievements_edit_widget.dart | 140 +++++++++++++++++- frontend/lib/provider/skills_edit_widget.dart | 114 +++++++++++++- frontend/lib/screens/edit_profile.dart | 49 +++++- 4 files changed, 353 insertions(+), 11 deletions(-) diff --git a/frontend/lib/provider/about_Edit_widget.dart b/frontend/lib/provider/about_Edit_widget.dart index f1fea87..87900db 100644 --- a/frontend/lib/provider/about_Edit_widget.dart +++ b/frontend/lib/provider/about_Edit_widget.dart @@ -19,15 +19,14 @@ class AboutController extends StateNotifier { } class AboutEditWidget extends ConsumerWidget { - const AboutEditWidget({Key? key}) : super(key: key); + final TextEditingController aboutController; + + const AboutEditWidget({required this.aboutController}); @override Widget build(BuildContext context, WidgetRef ref) { final about = ref.watch(aboutProvider); - final TextEditingController aboutController = - TextEditingController(text: about); - return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -50,4 +49,56 @@ class AboutEditWidget extends ConsumerWidget { ], ); } -} +}// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; + +// final aboutProvider = Provider((ref) { +// return ref.watch(aboutControllerProvider); +// }); + +// final aboutControllerProvider = +// StateNotifierProvider((ref) { +// return AboutController(); +// }); + +// class AboutController extends StateNotifier { +// AboutController() : super(""); + +// void updateAbout(String about) { +// state = about; +// } +// } + +// class AboutEditWidget extends ConsumerWidget { +// const AboutEditWidget({Key? key}) : super(key: key); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final about = ref.watch(aboutProvider); + +// final TextEditingController aboutController = +// TextEditingController(text: about); + +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// 'About', +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// TextField( +// controller: aboutController, +// onChanged: (newAbout) { +// ref.read(aboutControllerProvider.notifier).updateAbout(newAbout); +// }, +// decoration: const InputDecoration( +// hintText: 'Write something about yourself...', +// ), +// maxLines: 5, +// ), +// ], +// ); +// } +// } diff --git a/frontend/lib/provider/achievements_edit_widget.dart b/frontend/lib/provider/achievements_edit_widget.dart index e3a63ec..9d5d3ad 100644 --- a/frontend/lib/provider/achievements_edit_widget.dart +++ b/frontend/lib/provider/achievements_edit_widget.dart @@ -90,6 +90,24 @@ class AchievementsEditWidget extends ConsumerWidget { } }, ), + TextFormField( + // Add another text field for description + initialValue: achievements[index].description, + onChanged: (value) { + ref + .read(achievementsControllerProvider.notifier) + .updateAchievement( + index, + Achievement( + id: achievements[index].id, + name: achievements[index].name, + date: achievements[index].date, + description: value, + ), + ); + }, + decoration: const InputDecoration(labelText: 'Description'), + ), IconButton( icon: const Icon(Icons.delete), onPressed: () { @@ -118,4 +136,124 @@ class AchievementsEditWidget extends ConsumerWidget { ], ); } -} +}// import 'package:flutter/material.dart'; +// import 'package:calendar_date_picker2/calendar_date_picker2.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../models/achievement.dart'; + +// final achievementsProvider = Provider>((ref) { +// return ref.watch(achievementsControllerProvider); +// }); + +// final achievementsControllerProvider = +// StateNotifierProvider>((ref) { +// return AchievementsController(); +// }); + +// class AchievementsController extends StateNotifier> { +// AchievementsController() : super([]); + +// void addAchievement(Achievement achievement) { +// state = [...state, achievement]; +// } + +// void updateAchievement(int index, Achievement achievement) { +// state = [...state]; +// state[index] = achievement; +// } + +// void removeAchievement(int index) { +// state = [...state]..removeAt(index); +// } +// } + +// class AchievementsEditWidget extends ConsumerWidget { +// final TextEditingController achievementsController; + +// const AchievementsEditWidget({required this.achievementsController}); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final achievements = ref.watch(achievementsProvider); + +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Achievements', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// ListView.builder( +// shrinkWrap: true, +// itemCount: achievements.length, +// itemBuilder: (context, index) { +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// TextFormField( +// initialValue: achievements[index].name, +// onChanged: (value) { +// ref +// .read(achievementsControllerProvider.notifier) +// .updateAchievement( +// index, +// Achievement( +// id: achievements[index].id, +// name: value, +// date: achievements[index].date, +// description: achievements[index].description, +// ), +// ); +// }, +// decoration: const InputDecoration(labelText: 'Achievement'), +// ), +// CalendarDatePicker2( +// config: CalendarDatePicker2Config(), +// value: [achievements[index].date], +// onValueChanged: (List dates) { +// if (dates.isNotEmpty && dates[0] != null) { +// ref +// .read(achievementsControllerProvider.notifier) +// .updateAchievement( +// index, +// Achievement( +// id: achievements[index].id, +// name: achievements[index].name, +// date: dates[0]!, +// description: achievements[index].description, +// ), +// ); +// } +// }, +// ), +// IconButton( +// icon: const Icon(Icons.delete), +// onPressed: () { +// ref +// .read(achievementsControllerProvider.notifier) +// .removeAchievement(index); +// }, +// ), +// ], +// ); +// }, +// ), +// ElevatedButton( +// onPressed: () { +// ref.read(achievementsControllerProvider.notifier).addAchievement( +// Achievement( +// id: UniqueKey().toString(), +// name: "", +// date: DateTime.now(), +// description: "", +// ), +// ); +// }, +// child: const Text("Add Achievement"), +// ), +// ], +// ); +// } +// } diff --git a/frontend/lib/provider/skills_edit_widget.dart b/frontend/lib/provider/skills_edit_widget.dart index 5a8f91f..670485b 100644 --- a/frontend/lib/provider/skills_edit_widget.dart +++ b/frontend/lib/provider/skills_edit_widget.dart @@ -69,7 +69,7 @@ class SkillsEditWidget extends ConsumerWidget { ), ), Expanded( - child: SfSlider( + child: Slider( min: 0.0, max: 100.0, value: skills[index].level.toDouble(), @@ -82,6 +82,7 @@ class SkillsEditWidget extends ConsumerWidget { level: value.toInt()), ); }, + divisions: 5, // Add divisions ), ), IconButton( @@ -107,4 +108,113 @@ class SkillsEditWidget extends ConsumerWidget { ], ); } -} +}// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import 'package:syncfusion_flutter_sliders/sliders.dart'; +// import '../models/skills.dart'; + +// final skillsProvider = Provider>((ref) { +// return ref.watch(skillsControllerProvider); +// }); + +// final skillsControllerProvider = +// StateNotifierProvider>((ref) { +// return SkillsController(); +// }); + +// class SkillsController extends StateNotifier> { +// SkillsController() : super([]); + +// void addSkill(Skill skill) { +// state = [...state, skill]; +// } + +// void updateSkill(int index, Skill skill) { +// state = [...state]; +// state[index] = skill; +// } + +// void removeSkill(int index) { +// state = [...state]..removeAt(index); +// } +// } + +// class SkillsEditWidget extends ConsumerWidget { +// final TextEditingController skillsController; + +// const SkillsEditWidget({required this.skillsController}); + +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final skills = ref.watch(skillsProvider); + +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Skills', +// style: TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// ListView.builder( +// shrinkWrap: true, +// itemCount: skills.length, +// itemBuilder: (context, index) { +// return Row( +// children: [ +// Expanded( +// child: TextFormField( +// initialValue: skills[index].name, +// onChanged: (value) { +// ref.read(skillsControllerProvider.notifier).updateSkill( +// index, +// Skill( +// id: skills[index].id, +// name: value, +// level: skills[index].level), +// ); +// }, +// decoration: const InputDecoration(labelText: 'Skill'), +// ), +// ), +// Expanded( +// child: SfSlider( +// min: 0.0, +// max: 100.0, +// value: skills[index].level.toDouble(), +// onChanged: (dynamic value) { +// ref.read(skillsControllerProvider.notifier).updateSkill( +// index, +// Skill( +// id: skills[index].id, +// name: skills[index].name, +// level: value.toInt()), +// ); +// }, +// ), +// ), +// IconButton( +// icon: const Icon(Icons.delete), +// onPressed: () { +// ref +// .read(skillsControllerProvider.notifier) +// .removeSkill(index); +// }, +// ), +// ], +// ); +// }, +// ), +// ElevatedButton( +// onPressed: () { +// ref.read(skillsControllerProvider.notifier).addSkill( +// Skill(id: UniqueKey().toString(), name: "", level: 0), +// ); +// }, +// child: const Text("Add Skill"), +// ), +// ], +// ); +// } +// } diff --git a/frontend/lib/screens/edit_profile.dart b/frontend/lib/screens/edit_profile.dart index d1bceae..00b58e4 100644 --- a/frontend/lib/screens/edit_profile.dart +++ b/frontend/lib/screens/edit_profile.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../provider/skills_edit_widget.dart'; import '../provider/achievements_edit_widget.dart'; -import '../provider/about_edit_widget.dart'; +import '../provider/about_Edit_widget.dart'; import 'dart:convert'; class EditProfileScreen extends ConsumerWidget { @@ -25,7 +25,9 @@ class EditProfileScreen extends ConsumerWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AboutEditWidget(), + AboutEditWidget( + aboutController: TextEditingController(text: aboutController), + ), SkillsEditWidget( skillsController: TextEditingController(text: skillsJson), ), @@ -39,4 +41,45 @@ class EditProfileScreen extends ConsumerWidget { ), ); } -} +}// import 'package:flutter/material.dart'; +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import '../provider/skills_edit_widget.dart'; +// import '../provider/achievements_edit_widget.dart'; +// import '../provider/about_edit_widget.dart'; +// import 'dart:convert'; + +// class EditProfileScreen extends ConsumerWidget { +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final aboutController = ref.watch(aboutControllerProvider); +// final skills = ref.watch(skillsProvider); +// final achievements = ref.watch(achievementsProvider); + +// String skillsJson = jsonEncode(skills); +// String achievementsJson = jsonEncode(achievements); + +// return Scaffold( +// appBar: AppBar( +// title: const Text('Edit Profile'), +// ), +// body: SingleChildScrollView( +// child: Padding( +// padding: const EdgeInsets.all(16.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// AboutEditWidget(), +// SkillsEditWidget( +// skillsController: TextEditingController(text: skillsJson), +// ), +// AchievementsEditWidget( +// achievementsController: +// TextEditingController(text: achievementsJson), +// ), +// ], +// ), +// ), +// ), +// ); +// } +// } From 522dc0d2ccd1d00a1aa8042dfe9f036be57f8865 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Wed, 14 Feb 2024 16:12:58 +0530 Subject: [PATCH 28/29] removed redundant code --- frontend/lib/provider/about_Edit_widget.dart | 54 +------- .../provider/achievements_edit_widget.dart | 122 +----------------- frontend/lib/provider/skills_edit_widget.dart | 111 +--------------- frontend/lib/screens/edit_profile.dart | 43 +----- .../lib/screens/user/student_profile.dart | 80 ------------ 5 files changed, 4 insertions(+), 406 deletions(-) diff --git a/frontend/lib/provider/about_Edit_widget.dart b/frontend/lib/provider/about_Edit_widget.dart index 87900db..e80e11a 100644 --- a/frontend/lib/provider/about_Edit_widget.dart +++ b/frontend/lib/provider/about_Edit_widget.dart @@ -49,56 +49,4 @@ class AboutEditWidget extends ConsumerWidget { ], ); } -}// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; - -// final aboutProvider = Provider((ref) { -// return ref.watch(aboutControllerProvider); -// }); - -// final aboutControllerProvider = -// StateNotifierProvider((ref) { -// return AboutController(); -// }); - -// class AboutController extends StateNotifier { -// AboutController() : super(""); - -// void updateAbout(String about) { -// state = about; -// } -// } - -// class AboutEditWidget extends ConsumerWidget { -// const AboutEditWidget({Key? key}) : super(key: key); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final about = ref.watch(aboutProvider); - -// final TextEditingController aboutController = -// TextEditingController(text: about); - -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// 'About', -// style: const TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// TextField( -// controller: aboutController, -// onChanged: (newAbout) { -// ref.read(aboutControllerProvider.notifier).updateAbout(newAbout); -// }, -// decoration: const InputDecoration( -// hintText: 'Write something about yourself...', -// ), -// maxLines: 5, -// ), -// ], -// ); -// } -// } +} diff --git a/frontend/lib/provider/achievements_edit_widget.dart b/frontend/lib/provider/achievements_edit_widget.dart index 9d5d3ad..82d6129 100644 --- a/frontend/lib/provider/achievements_edit_widget.dart +++ b/frontend/lib/provider/achievements_edit_widget.dart @@ -136,124 +136,4 @@ class AchievementsEditWidget extends ConsumerWidget { ], ); } -}// import 'package:flutter/material.dart'; -// import 'package:calendar_date_picker2/calendar_date_picker2.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../models/achievement.dart'; - -// final achievementsProvider = Provider>((ref) { -// return ref.watch(achievementsControllerProvider); -// }); - -// final achievementsControllerProvider = -// StateNotifierProvider>((ref) { -// return AchievementsController(); -// }); - -// class AchievementsController extends StateNotifier> { -// AchievementsController() : super([]); - -// void addAchievement(Achievement achievement) { -// state = [...state, achievement]; -// } - -// void updateAchievement(int index, Achievement achievement) { -// state = [...state]; -// state[index] = achievement; -// } - -// void removeAchievement(int index) { -// state = [...state]..removeAt(index); -// } -// } - -// class AchievementsEditWidget extends ConsumerWidget { -// final TextEditingController achievementsController; - -// const AchievementsEditWidget({required this.achievementsController}); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final achievements = ref.watch(achievementsProvider); - -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Achievements', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// ListView.builder( -// shrinkWrap: true, -// itemCount: achievements.length, -// itemBuilder: (context, index) { -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// TextFormField( -// initialValue: achievements[index].name, -// onChanged: (value) { -// ref -// .read(achievementsControllerProvider.notifier) -// .updateAchievement( -// index, -// Achievement( -// id: achievements[index].id, -// name: value, -// date: achievements[index].date, -// description: achievements[index].description, -// ), -// ); -// }, -// decoration: const InputDecoration(labelText: 'Achievement'), -// ), -// CalendarDatePicker2( -// config: CalendarDatePicker2Config(), -// value: [achievements[index].date], -// onValueChanged: (List dates) { -// if (dates.isNotEmpty && dates[0] != null) { -// ref -// .read(achievementsControllerProvider.notifier) -// .updateAchievement( -// index, -// Achievement( -// id: achievements[index].id, -// name: achievements[index].name, -// date: dates[0]!, -// description: achievements[index].description, -// ), -// ); -// } -// }, -// ), -// IconButton( -// icon: const Icon(Icons.delete), -// onPressed: () { -// ref -// .read(achievementsControllerProvider.notifier) -// .removeAchievement(index); -// }, -// ), -// ], -// ); -// }, -// ), -// ElevatedButton( -// onPressed: () { -// ref.read(achievementsControllerProvider.notifier).addAchievement( -// Achievement( -// id: UniqueKey().toString(), -// name: "", -// date: DateTime.now(), -// description: "", -// ), -// ); -// }, -// child: const Text("Add Achievement"), -// ), -// ], -// ); -// } -// } +} diff --git a/frontend/lib/provider/skills_edit_widget.dart b/frontend/lib/provider/skills_edit_widget.dart index 670485b..e17220c 100644 --- a/frontend/lib/provider/skills_edit_widget.dart +++ b/frontend/lib/provider/skills_edit_widget.dart @@ -108,113 +108,4 @@ class SkillsEditWidget extends ConsumerWidget { ], ); } -}// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import 'package:syncfusion_flutter_sliders/sliders.dart'; -// import '../models/skills.dart'; - -// final skillsProvider = Provider>((ref) { -// return ref.watch(skillsControllerProvider); -// }); - -// final skillsControllerProvider = -// StateNotifierProvider>((ref) { -// return SkillsController(); -// }); - -// class SkillsController extends StateNotifier> { -// SkillsController() : super([]); - -// void addSkill(Skill skill) { -// state = [...state, skill]; -// } - -// void updateSkill(int index, Skill skill) { -// state = [...state]; -// state[index] = skill; -// } - -// void removeSkill(int index) { -// state = [...state]..removeAt(index); -// } -// } - -// class SkillsEditWidget extends ConsumerWidget { -// final TextEditingController skillsController; - -// const SkillsEditWidget({required this.skillsController}); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final skills = ref.watch(skillsProvider); - -// return Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// const Text( -// 'Skills', -// style: TextStyle( -// fontWeight: FontWeight.bold, -// ), -// ), -// ListView.builder( -// shrinkWrap: true, -// itemCount: skills.length, -// itemBuilder: (context, index) { -// return Row( -// children: [ -// Expanded( -// child: TextFormField( -// initialValue: skills[index].name, -// onChanged: (value) { -// ref.read(skillsControllerProvider.notifier).updateSkill( -// index, -// Skill( -// id: skills[index].id, -// name: value, -// level: skills[index].level), -// ); -// }, -// decoration: const InputDecoration(labelText: 'Skill'), -// ), -// ), -// Expanded( -// child: SfSlider( -// min: 0.0, -// max: 100.0, -// value: skills[index].level.toDouble(), -// onChanged: (dynamic value) { -// ref.read(skillsControllerProvider.notifier).updateSkill( -// index, -// Skill( -// id: skills[index].id, -// name: skills[index].name, -// level: value.toInt()), -// ); -// }, -// ), -// ), -// IconButton( -// icon: const Icon(Icons.delete), -// onPressed: () { -// ref -// .read(skillsControllerProvider.notifier) -// .removeSkill(index); -// }, -// ), -// ], -// ); -// }, -// ), -// ElevatedButton( -// onPressed: () { -// ref.read(skillsControllerProvider.notifier).addSkill( -// Skill(id: UniqueKey().toString(), name: "", level: 0), -// ); -// }, -// child: const Text("Add Skill"), -// ), -// ], -// ); -// } -// } +} diff --git a/frontend/lib/screens/edit_profile.dart b/frontend/lib/screens/edit_profile.dart index 00b58e4..3a78ce0 100644 --- a/frontend/lib/screens/edit_profile.dart +++ b/frontend/lib/screens/edit_profile.dart @@ -41,45 +41,4 @@ class EditProfileScreen extends ConsumerWidget { ), ); } -}// import 'package:flutter/material.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import '../provider/skills_edit_widget.dart'; -// import '../provider/achievements_edit_widget.dart'; -// import '../provider/about_edit_widget.dart'; -// import 'dart:convert'; - -// class EditProfileScreen extends ConsumerWidget { -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// final aboutController = ref.watch(aboutControllerProvider); -// final skills = ref.watch(skillsProvider); -// final achievements = ref.watch(achievementsProvider); - -// String skillsJson = jsonEncode(skills); -// String achievementsJson = jsonEncode(achievements); - -// return Scaffold( -// appBar: AppBar( -// title: const Text('Edit Profile'), -// ), -// body: SingleChildScrollView( -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// AboutEditWidget(), -// SkillsEditWidget( -// skillsController: TextEditingController(text: skillsJson), -// ), -// AchievementsEditWidget( -// achievementsController: -// TextEditingController(text: achievementsJson), -// ), -// ], -// ), -// ), -// ), -// ); -// } -// } +} diff --git a/frontend/lib/screens/user/student_profile.dart b/frontend/lib/screens/user/student_profile.dart index 38a5335..ecc6397 100644 --- a/frontend/lib/screens/user/student_profile.dart +++ b/frontend/lib/screens/user/student_profile.dart @@ -272,83 +272,3 @@ class StudentProfile extends ConsumerWidget { return Colors.primaries[Random().nextInt(Colors.primaries.length)]; } } - - -// import 'package:flutter/material.dart'; -// import 'package:flutter/widgets.dart'; -// import 'package:flutter_riverpod/flutter_riverpod.dart'; -// import 'package:smart_insti_app/provider/auth_provider.dart'; -// import '../../constants/constants.dart'; -// import '../../models/student.dart'; - -// class StudentProfile extends ConsumerWidget { -// const StudentProfile({super.key}); - -// @override -// Widget build(BuildContext context, WidgetRef ref) { -// WidgetsBinding.instance.addPostFrameCallback((_) { -// if (ref.read(authProvider.notifier).tokenCheckProgress != LoadingState.progress && context.mounted) { -// ref.read(authProvider.notifier).verifyAuthTokenExistence(context, AuthConstants.generalAuthLabel.toLowerCase()); -// } -// }); - -// final Student currentStudent = ref.read(authProvider).currentUser as Student; -// return Card( -// child: Padding( -// padding: const EdgeInsets.all(16.0), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// 'Name: ${currentStudent.name}', -// style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), -// ), -// SizedBox(height: 10), -// Text( -// 'Email: ${currentStudent.email}', -// style: TextStyle(fontSize: 16), -// ), -// SizedBox(height: 10), -// Text( -// 'Branch: ${currentStudent.branch}', -// style: TextStyle(fontSize: 16), -// ), -// SizedBox(height: 10), -// Text( -// 'Graduation Year: ${currentStudent.graduationYear}', -// style: TextStyle(fontSize: 16), -// ), -// SizedBox(height: 10), -// Text( -// 'About: ${currentStudent.about}', -// style: TextStyle(fontSize: 16), -// ), -// SizedBox(height: 10), -// Text( -// 'Roles: ${currentStudent.roles!.join(', ')}', -// style: TextStyle(fontSize: 16), -// ), -// SizedBox(height: 10), -// Column( -// children: currentStudent.skills!.map((skill) { -// return Column(children: [ -// Text('Achievement: ${skill.name}'), -// Text('Year: ${skill.level}'), -// ]); -// }).toList(), -// ), -// SizedBox(height: 10), -// Column( -// children: currentStudent.achievements!.map((achievement) { -// return Column(children: [ -// Text('Achievement: ${achievement.name}'), -// Text('Year: ${achievement.date}'), -// Text('Description: ${achievement.description}'), -// ]); -// }).toList(), -// ), -// ], -// ), -// )); -// } -// } From 29d86c77e185c1f4fb832a6bfa2e315203719854 Mon Sep 17 00:00:00 2001 From: SAISURYAtalla Date: Wed, 14 Feb 2024 16:15:28 +0530 Subject: [PATCH 29/29] initial location set to '/' --- frontend/lib/routes/routes.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/lib/routes/routes.dart b/frontend/lib/routes/routes.dart index 4cdf53c..63c635c 100644 --- a/frontend/lib/routes/routes.dart +++ b/frontend/lib/routes/routes.dart @@ -22,7 +22,7 @@ import '../screens/user/faculty_profile.dart'; import '../screens/user/student_profile.dart'; final GoRouter routes = GoRouter( - initialLocation: '/user_home/student_profile', + initialLocation: '/', routes: [ GoRoute( path: '/',