feat: admin panel enrichment

This commit is contained in:
mohamad
2026-07-19 14:31:28 +03:30
parent d8d7819eca
commit 1042fba121
77 changed files with 4616 additions and 2 deletions
+71
View File
@@ -0,0 +1,71 @@
# Generated by Django 5.2.15 on 2026-07-09 07:14
import apps.projects.uploads
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='ProjectBrief',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=300)),
('category', models.CharField(choices=[('web', 'Web development'), ('data', 'Data & analytics'), ('research', 'Research'), ('medical_imaging', 'Medical imaging'), ('workflow', 'Workflow automation'), ('other', 'Other')], max_length=32)),
('description', models.TextField()),
('goals', models.TextField()),
('budget_range', models.CharField(choices=[('under_5k', 'Under $5,000'), ('5k_15k', '$5,000 $15,000'), ('15k_50k', '$15,000 $50,000'), ('50k_plus', '$50,000+'), ('not_sure', 'Not sure yet')], max_length=32)),
('desired_deadline', models.DateField(blank=True, null=True)),
('reference_links', models.TextField(blank=True)),
('status', models.CharField(choices=[('submitted', 'Submitted'), ('under_review', 'Under review'), ('quoted', 'Quoted'), ('accepted', 'Accepted'), ('declined', 'Declined'), ('in_progress', 'In progress'), ('delivered', 'Delivered'), ('closed', 'Closed')], default='submitted', max_length=32)),
('quote_text', models.TextField(blank=True)),
('submitted_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project_briefs', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'Project Brief',
'verbose_name_plural': 'Project Briefs',
'ordering': ['-submitted_at'],
},
),
migrations.CreateModel(
name='ProjectBriefAttachment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('file', models.FileField(storage=apps.projects.uploads.ProjectAttachmentStorage(), upload_to=apps.projects.uploads.project_attachment_upload_to)),
('original_filename', models.CharField(max_length=255)),
('uploaded_at', models.DateTimeField(auto_now_add=True)),
('brief', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='projects.projectbrief')),
],
options={
'verbose_name': 'Project Attachment',
'verbose_name_plural': 'Project Attachments',
'ordering': ['uploaded_at'],
},
),
migrations.CreateModel(
name='ProjectInternalNote',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('note', models.TextField()),
('created_at', models.DateTimeField(auto_now_add=True)),
('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='project_internal_notes', to=settings.AUTH_USER_MODEL)),
('brief', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='internal_notes', to='projects.projectbrief')),
],
options={
'verbose_name': 'Internal Note',
'verbose_name_plural': 'Internal Notes',
'ordering': ['-created_at'],
},
),
]
@@ -0,0 +1,68 @@
# Generated by Django 5.2.15 on 2026-07-14 04:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='projectbrief',
name='public_image',
field=models.ImageField(blank=True, help_text='Image for the website project card.', null=True, upload_to='projects/showcase/'),
),
migrations.AddField(
model_name='projectbrief',
name='public_project_status',
field=models.CharField(blank=True, choices=[('', ''), ('new', 'New'), ('ongoing', 'Ongoing'), ('done', 'Done')], help_text='Filter category for the website showcase.', max_length=10),
),
migrations.AddField(
model_name='projectbrief',
name='public_summary',
field=models.TextField(blank=True, help_text='Short summary for the website project card.'),
),
migrations.AddField(
model_name='projectbrief',
name='public_tags',
field=models.CharField(blank=True, help_text='Comma-separated tags for the website card.', max_length=300),
),
migrations.AddField(
model_name='projectbrief',
name='public_title',
field=models.CharField(blank=True, help_text='Optional showcase title. Defaults to the brief title.', max_length=300),
),
migrations.AddField(
model_name='projectbrief',
name='public_url',
field=models.CharField(blank=True, help_text='Optional link for the website project card.', max_length=300),
),
migrations.AddField(
model_name='projectbrief',
name='show_category_on_website',
field=models.BooleanField(default=True, help_text='Show category as a tag on the website card.'),
),
migrations.AddField(
model_name='projectbrief',
name='show_description_on_website',
field=models.BooleanField(default=True, help_text='Include the brief description on the website card when no summary is set.'),
),
migrations.AddField(
model_name='projectbrief',
name='show_goals_on_website',
field=models.BooleanField(default=False, help_text='Include goals on the website card.'),
),
migrations.AddField(
model_name='projectbrief',
name='show_on_website',
field=models.BooleanField(default=False, help_text='Display this project in the public website showcase.'),
),
migrations.AddField(
model_name='projectbrief',
name='website_notes',
field=models.TextField(blank=True, help_text='Notes from Tecvico shown to the client in the portal.'),
),
]
@@ -0,0 +1,96 @@
# Generated by Django 5.2.15 on 2026-07-18 04:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0002_website_showcase_fields'),
]
operations = [
migrations.RemoveField(
model_name='projectbrief',
name='goals',
),
migrations.RemoveField(
model_name='projectbrief',
name='show_goals_on_website',
),
migrations.AddField(
model_name='projectbrief',
name='lock_attachments',
field=models.BooleanField(default=False, help_text='Lock attachments for the client.'),
),
migrations.AddField(
model_name='projectbrief',
name='lock_budget_range',
field=models.BooleanField(default=False, help_text='Lock budget range for the client.'),
),
migrations.AddField(
model_name='projectbrief',
name='lock_category',
field=models.BooleanField(default=False, help_text='Lock category for the client.'),
),
migrations.AddField(
model_name='projectbrief',
name='lock_description',
field=models.BooleanField(default=False, help_text='Lock description for the client.'),
),
migrations.AddField(
model_name='projectbrief',
name='lock_desired_deadline',
field=models.BooleanField(default=False, help_text='Lock desired deadline for the client.'),
),
migrations.AddField(
model_name='projectbrief',
name='lock_reference_links',
field=models.BooleanField(default=False, help_text='Lock reference links for the client.'),
),
migrations.AddField(
model_name='projectbrief',
name='lock_title',
field=models.BooleanField(default=False, help_text='Lock title for the client.'),
),
migrations.AddField(
model_name='projectbrief',
name='locked',
field=models.BooleanField(default=False, help_text='Lock the whole project so the client cannot edit it at all.'),
),
migrations.AddField(
model_name='projectbrief',
name='show_attachments_on_website',
field=models.BooleanField(default=False, help_text='Show attachment filenames on the website card.'),
),
migrations.AddField(
model_name='projectbrief',
name='show_budget_on_website',
field=models.BooleanField(default=False, help_text='Show the budget range on the website card.'),
),
migrations.AddField(
model_name='projectbrief',
name='show_deadline_on_website',
field=models.BooleanField(default=False, help_text='Show the desired deadline on the website card.'),
),
migrations.AddField(
model_name='projectbrief',
name='show_references_on_website',
field=models.BooleanField(default=False, help_text='Show reference links on the website card.'),
),
migrations.AddField(
model_name='projectbrief',
name='show_title_on_website',
field=models.BooleanField(default=True, help_text='Show the title on the website card.'),
),
migrations.AlterField(
model_name='projectbrief',
name='description',
field=models.TextField(help_text='Project scope, context, and goals combined.'),
),
migrations.AlterField(
model_name='projectbrief',
name='show_description_on_website',
field=models.BooleanField(default=True, help_text='Use the description as the website card summary when no summary is set.'),
),
]
@@ -0,0 +1,28 @@
# Generated by Django 5.2.15 on 2026-07-19 04:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0003_merge_goals_and_lock_visibility'),
]
operations = [
migrations.AlterField(
model_name='projectbrief',
name='budget_range',
field=models.CharField(blank=True, choices=[('under_5k', 'Under $5,000'), ('5k_15k', '$5,000 $15,000'), ('15k_50k', '$15,000 $50,000'), ('50k_plus', '$50,000+'), ('not_sure', 'Not sure yet')], default='', max_length=32),
),
migrations.AlterField(
model_name='projectbrief',
name='category',
field=models.CharField(blank=True, choices=[('web', 'Web development'), ('data', 'Data & analytics'), ('research', 'Research'), ('medical_imaging', 'Medical imaging'), ('workflow', 'Workflow automation'), ('other', 'Other')], default='', max_length=32),
),
migrations.AlterField(
model_name='projectbrief',
name='description',
field=models.TextField(blank=True, default='', help_text='Project scope, context, and goals combined.'),
),
]