[UPDT] PAYROLL: Comment section updation in reimbursement,leave and bonus encashment request and updation with multiple file uploading comment both card and list view

This commit is contained in:
Horilla
2024-03-28 10:03:31 +05:30
parent 8b52c2b5d9
commit 0dd614db7a
9 changed files with 446 additions and 189 deletions

View File

@@ -1757,6 +1757,11 @@ except:
pass
class ReimbursementFile(models.Model):
file = models.FileField(upload_to="payroll/request_files")
objects = models.Manager()
class ReimbursementrequestComment(HorillaModel):
"""
ReimbursementRequestComment Model
@@ -1765,6 +1770,12 @@ class ReimbursementrequestComment(HorillaModel):
request_id = models.ForeignKey(Reimbursement, on_delete=models.CASCADE)
employee_id = models.ForeignKey(Employee, on_delete=models.CASCADE)
comment = models.TextField(null=True, verbose_name=_("Comment"), max_length=255)
files = models.ManyToManyField(ReimbursementFile, blank=True)
created_at = models.DateTimeField(
auto_now_add=True,
verbose_name=_("Created At"),
null=True,
)
def __str__(self) -> str:
return f"{self.comment}"