diff --git a/src/assets/certificate/signature-patrik.png b/src/assets/certificate/signature-patrik.png new file mode 100644 index 0000000..7e7d9c7 Binary files /dev/null and b/src/assets/certificate/signature-patrik.png differ diff --git a/src/services/ai-kurzy/certificate.service.js b/src/services/ai-kurzy/certificate.service.js index d51f63d..4a7f261 100644 --- a/src/services/ai-kurzy/certificate.service.js +++ b/src/services/ai-kurzy/certificate.service.js @@ -16,28 +16,56 @@ const TEMPLATES_DIR = path.join(process.cwd(), 'src', 'templates', 'certificates * Available certificate templates */ export const CERTIFICATE_TEMPLATES = { + // AI certifikáty s dynamickým názvom kurzu a rôznymi lektormi AIcertifikat: { - name: 'AI Certifikát', + name: 'AI Certifikát (Zdarílek)', file: 'AIcertifikat.html', - description: 'Osvedčenie o absolvovaní AI kurzu', + description: 'AI kurz - lektor Zdarílek + Gablasová', background: 'background.jpeg', }, - ScrumGeneric: { - name: 'Scrum (Gablas)', - file: 'ScrumGeneric.html', - description: 'Scrum Master / Product Owner - lektor Gablas', + AIcertifikatGablas: { + name: 'AI Certifikát (Gablas)', + file: 'AIcertifikatGablas.html', + description: 'AI kurz - lektor Gablas + Gablasová', + background: 'background.jpeg', + }, + AIcertifikatPatrik: { + name: 'AI Certifikát (Patrik)', + file: 'AIcertifikatPatrik.html', + description: 'AI kurz - lektor Patrik + Gablasová', + background: 'background.jpeg', + }, + // Scrum certifikáty - fixný názov kurzu, podpisy v pozadí + ScrumMaster: { + name: 'Scrum Master', + file: 'ScrumMaster.html', + description: 'Scrum Master - Gablas + Gablasová', background: 'background-blue.jpeg', }, - ITIL: { - name: 'ITIL (Husam)', - file: 'ITIL.html', - description: 'ITIL Foundation - lektor Husam', + ScrumProductOwner: { + name: 'Scrum Product Owner', + file: 'ScrumProductOwner.html', + description: 'Scrum Product Owner - Gablas + Gablasová', + background: 'background-blue.jpeg', + }, + // ITIL certifikát - fixný názov kurzu, podpisy v pozadí + ITILFoundation: { + name: 'ITIL® 4 Foundation', + file: 'ITILFoundation.html', + description: 'ITIL Foundation - Husam + Gablasová', background: 'background-green.jpeg', }, - PRINCE2: { - name: 'PRINCE2 (Gablas)', - file: 'PRINCE2.html', - description: 'PRINCE2 Foundation/Practitioner - lektor Gablas', + // PRINCE2 certifikáty - fixný názov kurzu, podpisy v pozadí + PRINCE2Foundation: { + name: 'PRINCE2® Foundation', + file: 'PRINCE2Foundation.html', + description: 'PRINCE2 Foundation - Gablas + Gablasová', + background: 'background-orange.jpeg', + }, + PRINCE2Practitioner: { + name: 'PRINCE2® Practitioner', + file: 'PRINCE2Practitioner.html', + description: 'PRINCE2 Practitioner - Gablas + Gablasová', background: 'background-orange.jpeg', }, }; @@ -74,16 +102,20 @@ const loadAssets = async (templateName) => { const template = CERTIFICATE_TEMPLATES[templateName]; const backgroundFile = template?.background || 'background.jpeg'; - const [background, signatureGablasova, signatureZdarilek] = await Promise.all([ + const [background, signatureGablasova, signatureZdarilek, signatureGablas, signaturePatrik] = await Promise.all([ fs.readFile(path.join(ASSETS_DIR, backgroundFile)), fs.readFile(path.join(ASSETS_DIR, 'signature-gablasova.png')), fs.readFile(path.join(ASSETS_DIR, 'signature-zdarilek.png')), + fs.readFile(path.join(ASSETS_DIR, 'signature-gablas.png')), + fs.readFile(path.join(ASSETS_DIR, 'signature-patrik.png')), ]); return { backgroundImage: `data:image/jpeg;base64,${background.toString('base64')}`, signatureGablasova: `data:image/png;base64,${signatureGablasova.toString('base64')}`, signatureZdarilek: `data:image/png;base64,${signatureZdarilek.toString('base64')}`, + signatureGablas: `data:image/png;base64,${signatureGablas.toString('base64')}`, + signaturePatrik: `data:image/png;base64,${signaturePatrik.toString('base64')}`, }; }; diff --git a/src/templates/certificates/AIcertifikatGablas.html b/src/templates/certificates/AIcertifikatGablas.html new file mode 100644 index 0000000..ed0e0a8 --- /dev/null +++ b/src/templates/certificates/AIcertifikatGablas.html @@ -0,0 +1,163 @@ + + + + + + Osvedčenie - {{participantName}} + + + +
+
+

O S V E D Č E N I E

+

o absolvovaní kurzu

+ +
+

{{courseTitle}}

+ {{#if courseModules}} +

{{courseModules}}

+ {{/if}} + {{#if dateRange}} +

{{dateRange}}

+ {{/if}} +
+ +

{{participantName}}

+
+ + + +
ID: {{certificateId}}
+
+ + diff --git a/src/templates/certificates/AIcertifikatPatrik.html b/src/templates/certificates/AIcertifikatPatrik.html new file mode 100644 index 0000000..614f864 --- /dev/null +++ b/src/templates/certificates/AIcertifikatPatrik.html @@ -0,0 +1,163 @@ + + + + + + Osvedčenie - {{participantName}} + + + +
+
+

O S V E D Č E N I E

+

o absolvovaní kurzu

+ +
+

{{courseTitle}}

+ {{#if courseModules}} +

{{courseModules}}

+ {{/if}} + {{#if dateRange}} +

{{dateRange}}

+ {{/if}} +
+ +

{{participantName}}

+
+ + + +
ID: {{certificateId}}
+
+ + diff --git a/src/templates/certificates/ITIL.html b/src/templates/certificates/ITILFoundation.html similarity index 75% rename from src/templates/certificates/ITIL.html rename to src/templates/certificates/ITILFoundation.html index edc24f2..caab3d5 100644 --- a/src/templates/certificates/ITIL.html +++ b/src/templates/certificates/ITILFoundation.html @@ -7,27 +7,10 @@ + + +
+
+

{{participantName}}

+

Scrum Master

+ {{#if dateRange}} +

{{dateRange}}

+ {{/if}} +

v rozsahu 16 hodín

+
+ +
{{issueDate}}
+
ID: {{certificateId}}
+
+ + diff --git a/src/templates/certificates/ScrumProductOwner.html b/src/templates/certificates/ScrumProductOwner.html new file mode 100644 index 0000000..8a79cd7 --- /dev/null +++ b/src/templates/certificates/ScrumProductOwner.html @@ -0,0 +1,94 @@ + + + + + + Osvedčenie - {{participantName}} + + + +
+
+

{{participantName}}

+

Scrum Product Owner

+ {{#if dateRange}} +

{{dateRange}}

+ {{/if}} +

v rozsahu 16 hodín

+
+ +
{{issueDate}}
+
ID: {{certificateId}}
+
+ + diff --git a/whattotest.txt b/whattotest.txt index 262ced6..b45706d 100644 --- a/whattotest.txt +++ b/whattotest.txt @@ -1,15 +1,49 @@ -Refactoring Smoke Test Checklist -================================= + Task 1: Changed "Todos" to "Úlohy" in Sidebar -1. [x] Start server (npm run dev) — does it boot without import errors? -2. [x] Login — check audit log entry exists -3. [x] Create a company — check audit log -4. [x] Add a note to the company -5. [x] Add a reminder to the company -6. [x] Assign a user to the company -7. [x] Create a project, assign user -8. [x] Create a todo with assigned users — check push notification -9. [x] Start/stop/pause/resume a timer -10. [x] Generate a monthly timesheet XLSX — open and verify -11. [x] Upload a file to a project (check size/type limits) -12. [x] AI Kurzy: create course, participant, registration + Task 2: Fixed EventDetail panel width from w-max to w-80 + + Task 3: Chat Online Indicator: + - Added sendHeartbeat() to userApi + - Added heartbeat interval (30s) in AppDataContext + - Added green dot indicator in ChatList for users online < 60s + + Task 4: Updated search placeholder in CompaniesPage + + Task 5: Calendar Notification Badge: + - Created CalendarCountContext.jsx + - Added getTodayCount() to eventApi + - Added badge to Calendar button in Sidebar + + Task 6: Calendar Reminders Display: + - Added reminders state to useCalendarData + - Display reminders in CalendarGrid with orange styling and bell icon + + Task 7: team_leader role access in Sidebar + + Task 8: Changed "AI Kurzy" to "Všetky kurzy" in Sidebar + + Task 9: User Flagging System: + - Added needsFollowup checkbox column to RegistrationsTable + - Added red ring around rows when needsFollowup is true + + Task 10: Sidebar Reorganization with logical sections: + - Quick Access: Profil, Dashboard, Chat, Kalendár + - Work Management: Úlohy, Sledovanie času, Výkazy + - CRM: Firmy, Projekty, Kontakty + - Communication: Emaily, Doručené + - Services: Služby + - Admin: Používatelia, História akcií, Všetky kurzy + + --- + Next Steps: + + 1. Run npm run db:push in crm-server to apply database changes + 2. Test all features + 3. Commit changes when ready + +- i cant see online users there is not any green indicator and should be there +- i wanted to search comapny by her title,number , email address or website linked to company + now when i type phone nuber for exasmle it not display any company +- badge was added to kalendar button in Sidebar but i want to show number for whole day todos,reminders,dostupnost not only meetings/events +- i cant see the new role team_leader why ?? i cant create user with that role or edit role to team team_leader +-