This is an app bootstrapped according to the init.tips stack, also known as the T3-Stack.
lakardion / akd Goto Github PK
View Code? Open in Web Editor NEWHome Page: akd.vercel.app
Home Page: akd.vercel.app
This is an app bootstrapped according to the init.tips stack, also known as the T3-Stack.
When going to precios/alumnos
we get a false positive in the Alumnos nav. This is due to how it is currently checking for current page.
Although I wanted to go with this approach. It seems like there is no prisma adapter to do credentials login:
https://next-auth.js.org/providers/credentials
When a class session is about to be created, students may or may not have the required amount of hours to make up for what the class requires.
So if they turn to be negative, they should somehow pay for those hours, but simply subtracting their hours gives no context whatsoever as to how they're consuming the hours (and how much they should pay for their debt later on).
So it would be useful if we can detect which students are the ones that don't have enough hours and allow the user to set either the rate that they should pay those hours for or simply registering how much should they pay for that debt.
Proposed approach
Tech considerations
studentId
hours
rate
(which could also be custom)Hour
here but since I want to be able to set a custom rate it might not be enoughPrisma already uses decimal.js underneath. So we can remove the library from our main dependencies, and let us use Prisma's internal decimal.js.
There are situations where a single payment could cover multiple debts.
So the question here has to do whether we want to remove the uniqueness constraint of paymentId
in StudentDebt
Currently:
model StudentDebt {
id String @id @default(cuid())
hours Decimal
studentId String
paymentId String? @unique
classSessionId String
rate Decimal
restored Boolean @default(false)
classSession ClassSession @relation(fields: [classSessionId], references: [id], onDelete: Cascade)
payment Payment? @relation(fields: [paymentId], references: [id])
student Student @relation(fields: [studentId], references: [id])
}
Alumnos view overflow has been broken for some time. We should look into it and improve its layout to allow it to properly overflow if it goes off-screen
I believe this is specific to removing students while creating a class session.
Removing a student from a list of already-complying students, should not flash the warning message.
Some modals are not properly styled and don't have a backdroop
It would also be nice to include in here a better padding approach for modals which looks really odd as well as their responsiveness
Instead of requiring typing everytime a student gets registered, we could add tables for universities, faculties and course of studies so that those can be loaded from a react-select rather
This table is doing nothing but increasing the app's data complexity by obscuring a simple number.
Maybe I regret this later, but this is my call right now.
I don't need hour entities if all they're going to hold is simply an int value
Class sessions can be either created on the go within a student or created separately
When we’re in the Student view we can assign that student a class.
The opening form should allow the user to create a class on the go. We can do this with a checkbox to determine whether we want to create it there OR choose an existing class (if any, if there are no future classes we should not allow the user to assign a class, thus they will have to create one there)
If successful the class session will be created only for the given student
( or also allow to add more students here?) => maybe not. TBD
Class session view will allow to create a class session with multiple students at the same time. Should be able to be created without students as well, maybe as a placeholder.
I think this would be cool since there may be students that may not want to pay all the debt upfront but instead pay a part and then pay another part later.
If we don't provide this we would be leaving this use case out of the app
One major thing I am a bit concerned about when thinking about implementing this is the fact that a single student can have multiple debts.
So partial payment would involve having to take into account the fact that students that have multiple debts, should cover them from oldest to newest.
paymentId
across StudentDebt
entities. (Not sure whether this is the right call Spinoff somewhere else: #13 ).[WIP]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.