[UPDT] LOAD_DATA: Updated mail template & automation json file

This commit is contained in:
Horilla
2025-09-12 11:57:45 +05:30
parent bb95bc97fc
commit 9cc32d326c
2 changed files with 75 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -230,7 +230,33 @@
"is_active": false,
"title": "Late Come Notification",
"body": "<div style=\"font-family: 'Segoe UI', Arial, sans-serif; background-color: #f4f6f9; padding: 40px;\">\n <div style=\"max-width: 650px; margin: auto; background: #ffffff; border-radius: 16px; padding: 40px; box-shadow: 0 6px 18px rgba(0,0,0,0.1); border: 1px solid #eaeaea;\">\n \n <!-- HEADER -->\n <h1 style=\"color: #e74c3c; text-align: center; font-size: 26px; margin-bottom: 30px; font-weight: 600;\">\n Attendance Notification {{ model_instance.get_type_display }}\n </h1>\n\n <!-- GREETING -->\n <p style=\"font-size: 16px; color: #333; line-height: 1.8; margin-bottom: 20px;\">\n Dear <strong>{{ model_instance.employee_id }}</strong>,\n </p>\n\n <!-- MESSAGE -->\n <p style=\"font-size: 15px; color: #444; line-height: 1.8; margin-bottom: 20px;\">\n This is to inform you that on <strong>{{ model_instance.attendance_id.attendance_date }}</strong>, \n your attendance record shows a <strong>{{ model_instance.get_type_display }}</strong>.\n </p>\n\n <!-- DETAILS BOX -->\n <div style=\"margin: 25px 0; padding: 20px; background: #fff5f5; border-left: 5px solid #e74c3c; border-radius: 8px;\">\n <p style=\"margin: 0 0 10px 0; font-size: 15px; color: #b71c1c; font-weight: 600;\">\n Attendance Details:\n </p>\n <ul style=\"margin: 0; padding-left: 22px; font-size: 14px; color: #333; line-height: 1.6;\">\n <li><strong>Date:</strong> {{ model_instance.attendance_id.attendance_date }}</li>\n <li><strong>Check-In:</strong> {{ model_instance.attendance_id.attendance_clock_in }}</li>\n <li><strong>Check-Out:</strong> {{ model_instance.attendance_id.attendance_clock_out }}</li>\n <li><strong>Shift:</strong> {{ model_instance.attendance_id.shift_id }}</li>\n <li><strong>Work Type:</strong> {{ model_instance.attendance_id.work_type_id }}</li>\n </ul>\n </div>\n\n <!-- MANAGER INFO -->\n <p style=\"font-size: 15px; color: #444; line-height: 1.8; margin-top: 20px;\">\n If there are any genuine reasons for the delay, please ensure you inform your reporting manager in advance.\n </p>\n \n <div style=\"text-align: center; margin-top: 25px;\">\n <a href=\"{{ request.scheme }}://{{ request.get_host }}/attendance/late-come-early-out-view/?employee_id={{ model_instance.employee_id.id }}&amp;attendance_date={{ model_instance.attendance_id.attendance_date }}\" style=\"display: inline-block; padding: 10px 20px; background-color: hsl(8, 77%, 56%); color: white; text-decoration: none; border-radius: 6px; font-weight: 500;\">\n View Attendance\n </a>\n </div>\n\n <!-- FOOTER -->\n <hr style=\"margin: 35px 0; border: none; border-top: 1px solid #eee;\">\n\n <p style=\"font-size: 13px; color: #777; text-align: center; line-height: 1.6;\">\n Regards,<br>\n HR Department \n {% if model_instance.employee_id.employee_work_info.company_id %}\n <br><strong>{{ model_instance.employee_id.employee_work_info.company_id }}</strong>\n {% endif %}\n </p>\n\n <p style=\"font-size: 11px; color: #aaa; text-align: center; margin-top: 20px; line-height: 1.4;\">\n This is an automated message from the HRMS system. Please do not reply directly to this email.\n </p>\n </div>\n</div>",
"company_id": 1
"company_id": null
}
},
{
"model": "base.horillamailtemplate",
"pk": 19,
"fields": {
"created_at": "2025-09-11T08:42:00.946Z",
"created_by": 1,
"modified_by": 1,
"is_active": false,
"title": "Ticket Mail Template",
"body": "<div style=\"font-family: 'Segoe UI', sans-serif; background-color: #f9f9f9; padding: 30px;\">\n <div style=\"max-width: 600px; margin: auto; background: white; border-radius: 12px; padding: 30px; box-shadow: 0 4px 12px rgba(0,0,0,0.08);\">\n\n <h2 style=\"color: #000000; text-align: center; font-size: 22px; margin-bottom: 25px;\">\n New Ticket Created\n </h2>\n\n <p style=\"font-size: 14px; color: #333; line-height: 1.6;\">\n Hi {{ model_instance.employee_id.get_full_name }},\n </p>\n\n <p style=\"font-size: 14px; color: #333; line-height: 1.6;\">\n A new ticket has been created in the system with the following details:\n </p>\n\n <div style=\"margin: 20px 0; padding: 15px; background: #f4f4f4; border-left: 4px solid hsl(8, 77%, 56%); border-radius: 6px;\">\n <p style=\"margin: 6px 0;\"><strong>Title:</strong> {{ model_instance.title }}</p>\n <p style=\"margin: 6px 0;\"><strong>Type:</strong> {{ model_instance.ticket_type.title }}</p>\n <p style=\"margin: 6px 0;\"><strong>Priority:</strong> {{ model_instance.priority|title }}</p>\n <p style=\"margin: 6px 0;\"><strong>Status:</strong> {{ model_instance.status|title }}</p>\n <p style=\"margin: 6px 0;\"><strong>Deadline:</strong> {{ model_instance.deadline|default:\"N/A\" }}</p>\n </div>\n\n <h3 style=\"font-size: 16px; color: #000; margin-top: 25px;\">Description</h3>\n <div style=\"margin: 15px 0; padding: 15px; background: #fafafa; border: 1px solid #eee; border-radius: 6px;\">\n {{ model_instance.description|safe }}\n </div>\n\n <div style=\"text-align: center; margin-top: 25px;\">\n <a href=\"{{ request.scheme }}://{{ request.get_host }}/helpdesk/ticket-detail/{{ model_instance.id }}/\" style=\"display: inline-block; padding: 10px 20px; background-color: hsl(8, 77%, 56%); color: white; text-decoration: none; border-radius: 6px; font-weight: 500;\">\n View Ticket\n </a>\n </div>\n\n <p style=\"font-size: 14px; color: #333; line-height: 1.6; margin-top: 20px;\">\n You can log in to the HRMS portal to track the ticket and provide updates.\n </p>\n\n <hr style=\"margin: 30px 0; border: none; border-top: 1px solid #eee;\">\n\n <p style=\"font-size: 12px; color: #888; text-align: center; line-height: 1.5;\">\n This is an automated message from the HRMS system.<br>\n Regards, {% if model_instance.employee_id.get_company %}\n <strong>{{ model_instance.employee_id.get_company }}</strong>{% endif %}\n </p>\n </div>\n</div>",
"company_id": null
}
},
{
"model": "base.horillamailtemplate",
"pk": 20,
"fields": {
"created_at": "2025-09-11T06:35:00.562Z",
"created_by": 1,
"modified_by": 1,
"is_active": false,
"title": "Ticket Comment Mail Template",
"body": "<div style=\"font-family: 'Segoe UI', sans-serif; background-color: #f9f9f9; padding: 30px;\">\n <div style=\"max-width: 600px; margin: auto; background: white; border-radius: 12px; padding: 30px; box-shadow: 0 4px 12px rgba(0,0,0,0.08);\">\n\n <h2 style=\"color: #000000; text-align: center; font-size: 22px; margin-bottom: 25px;\">\n New Comment on Your Ticket\n </h2>\n\n <p style=\"font-size: 14px; color: #333; line-height: 1.6;\">\n Hi {{ model_instance.ticket.employee_id.get_full_name }},\n </p>\n\n <p style=\"font-size: 14px; color: #333; line-height: 1.6;\">\n A new comment has been added to your ticket <strong>\"{{ model_instance.ticket.title }}\"</strong>.\n </p>\n\n <div style=\"margin: 20px 0; padding: 15px; background: #f4f4f4; border-left: 4px solid hsl(8, 77%, 56%); border-radius: 6px;\">\n <p style=\"margin: 6px 0;\">\n <strong>Commented By:</strong>\n <span style=\"color: #333;\">{{ model_instance.employee_id.get_full_name }}</span>\n </p>\n <p style=\"margin: 6px 0;\">\n <strong>Comment:</strong>\n <span style=\"color: #333;\">{{ model_instance.comment|safe }}</span>\n </p>\n <p style=\"margin: 6px 0;\">\n <strong>Date:</strong>\n <span style=\"color: #333;\">{{ model_instance.date }}</span>\n </p>\n </div>\n <div style=\"text-align: center; margin-top: 25px;\">\n <a href=\"{{ request.scheme }}://{{ request.get_host }}/helpdesk/ticket-detail/{{ model_instance.ticket.id }}/\" style=\"display: inline-block; padding: 10px 20px; background-color: hsl(8, 77%, 56%); color: white; text-decoration: none; border-radius: 6px; font-weight: 500;\">\n View Comment\n </a>\n </div>\n\n <h3 style=\"font-size: 16px; color: #000; margin-top: 25px;\">Ticket Details</h3>\n <div style=\"margin: 15px 0; padding: 15px; background: #fafafa; border: 1px solid #eee; border-radius: 6px;\">\n <p style=\"margin: 6px 0;\"><strong>Type:</strong> {{ model_instance.ticket.ticket_type.title }}</p>\n <p style=\"margin: 6px 0;\"><strong>Priority:</strong> {{ model_instance.ticket.priority|title }}</p>\n <p style=\"margin: 6px 0;\"><strong>Status:</strong> {{ model_instance.ticket.status|title }}</p>\n <p style=\"margin: 6px 0;\"><strong>Raised On:</strong> {{ model_instance.ticket.get_raised_on }}</p>\n </div>\n\n <p style=\"font-size: 14px; color: #333; line-height: 1.6; margin-top: 20px;\">\n Please log in to the HRMS portal to view more details and respond if necessary.\n </p>\n\n <hr style=\"margin: 30px 0; border: none; border-top: 1px solid #eee;\">\n\n <p style=\"font-size: 12px; color: #888; text-align: center; line-height: 1.5;\">\n This is an automated message from the HRMS system.<br>\n Regards, {% if model_instance.ticket.employee_id.get_company %}\n <strong>{{ model_instance.ticket.employee_id.get_company }}</strong>{% endif %}\n </p>\n </div>\n</div>",
"company_id": null
}
}
]