feat: Implement initial frontend for instructor and admin course management functionalities.
All checks were successful
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 4m21s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 7s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 1s
All checks were successful
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 4m21s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 7s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 1s
This commit is contained in:
parent
c8ef372d4e
commit
03f16cf2fd
15 changed files with 197 additions and 36 deletions
|
|
@ -342,11 +342,18 @@ const save = async () => {
|
|||
|
||||
saving.value = true;
|
||||
try {
|
||||
// Convert local datetime to ISO string to preserve timezone
|
||||
const payload = { ...form.value };
|
||||
if (payload.published_at) {
|
||||
const localDate = new Date(payload.published_at.replace(' ', 'T'));
|
||||
payload.published_at = localDate.toISOString();
|
||||
}
|
||||
|
||||
if (editing.value) {
|
||||
await instructorService.updateAnnouncement(props.courseId, editing.value.id, form.value);
|
||||
await instructorService.updateAnnouncement(props.courseId, editing.value.id, payload);
|
||||
$q.notify({ type: 'positive', message: 'บันทึกประกาศสำเร็จ', position: 'top' });
|
||||
} else {
|
||||
const created = await instructorService.createAnnouncement(props.courseId, form.value);
|
||||
const created = await instructorService.createAnnouncement(props.courseId, payload);
|
||||
|
||||
// Upload pending files
|
||||
for (const file of pendingFiles.value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue