feat(v3): restructure project + add complete frontend
- Restructure: move backend from new_project/ to backend/ - Add full React/TypeScript frontend (37 pages, 17 services, 16 type defs, 11 query hooks) - Add docs/ with SRS specs, user stories, and workflow documentation - Update .gitignore for new directory layout Workflows implemented: WF1 User Signup, WF2 Placement Test, WF3 Exam Configuration, WF4 General English Exam, WF5 Course Generation, WF6 Entity Student Onboarding, AI Course Generation, Adaptive Learning Engine UI, White-Label Branding, Score Release Made-with: Cursor
This commit is contained in:
1
custom_addons/encoach_branding/models/__init__.py
Normal file
1
custom_addons/encoach_branding/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import branding
|
||||
40
custom_addons/encoach_branding/models/branding.py
Normal file
40
custom_addons/encoach_branding/models/branding.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class EncoachBranding(models.Model):
|
||||
_name = 'encoach.branding'
|
||||
_description = 'Entity Branding'
|
||||
|
||||
entity_id = fields.Many2one('encoach.entity', required=True, ondelete='cascade')
|
||||
primary_color = fields.Char(default='#4F46E5')
|
||||
secondary_color = fields.Char(default='#7C3AED')
|
||||
background_color = fields.Char(default='#FFFFFF')
|
||||
logo = fields.Binary(attachment=True)
|
||||
logo_url = fields.Char(string='Logo URL')
|
||||
favicon = fields.Binary(attachment=True)
|
||||
app_name = fields.Char(default='EnCoach')
|
||||
white_label_domain = fields.Char(string='Subdomain')
|
||||
login_title = fields.Char(default='Welcome to EnCoach')
|
||||
login_description = fields.Text()
|
||||
custom_css = fields.Text()
|
||||
|
||||
_entity_unique = models.Constraint('UNIQUE(entity_id)', 'Branding record must be unique per entity.')
|
||||
|
||||
def to_api_dict(self):
|
||||
self.ensure_one()
|
||||
return {
|
||||
'id': self.id,
|
||||
'entity_id': self.entity_id.id,
|
||||
'entity_name': self.entity_id.name,
|
||||
'primary_color': self.primary_color,
|
||||
'secondary_color': self.secondary_color,
|
||||
'background_color': self.background_color or '#FFFFFF',
|
||||
'has_logo': bool(self.logo),
|
||||
'logo_url': self.logo_url or '',
|
||||
'has_favicon': bool(self.favicon),
|
||||
'app_name': self.app_name,
|
||||
'white_label_domain': self.white_label_domain or '',
|
||||
'login_title': self.login_title or '',
|
||||
'login_description': self.login_description or '',
|
||||
'custom_css': self.custom_css or '',
|
||||
}
|
||||
Reference in New Issue
Block a user