feat: add 4 certificate templates (#295)
* add cloud translation api package * feat: Script that auto generates translations for other languages * add comments * fix: broken translation * improve translation * update locck file * clean up * all round trasnlations check * checkpoint * finish up * move to dev dependencies * fix vercel build error * translations fix * - add documentation - translation bug fix * quick adjust * PR Fixes * add new line * update docs * checkpoint * feat: redesign & addition of certificates * text color update * patterned width fix * "student-name" class remove * checkpoint * PR Fix * quick fix * PR Fixes * update certificate ready page for students * PR Fixes * quick cleanup * move fetchCourses into .ts file * feat: give students access to certificates only after completing course * checkpoint * height fix * Merge branch 'main' of https://github.com/rotimi-best/classroomio into classroomio-issue-272 * Fix; merge PR Fix * fix: width of plain & professional certs * PR Fix * feat: add translation * handle error when trying to download a certificate * add fetchExploreCourses * fix: requested reviews * review fixes checkpoint * replace the certificate background * height fix for patterned certififcates * fix more bugs * rename schema --------- Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
f0907dde89
commit
72b58ed2c7
@@ -125,6 +125,17 @@ const onboardingValidationSchema = {
|
||||
})
|
||||
};
|
||||
|
||||
const saveCertificateSchema = z.object({
|
||||
description: z.string().max(200, 'course.navItem.certificates.description_error'),
|
||||
is_certificate_downloadable: z.boolean(),
|
||||
certificate_theme: z.string()
|
||||
});
|
||||
|
||||
export const saveCertificateValidation = (fields = {}) => {
|
||||
const { error } = saveCertificateSchema.safeParse(fields);
|
||||
return processErrors(error);
|
||||
};
|
||||
|
||||
const updateProfileValidationSchema = z.object({
|
||||
email: z.string().email({ message: 'validations.user_profile.email' }),
|
||||
username: z.string().nonempty({ message: 'validations.user_profile.username' }),
|
||||
|
||||
Reference in New Issue
Block a user