-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 修改 課前詢問、評分回傳資訊 #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankazu
不太理解「須留意之後重構需把表內而外新增的 date、name 移除」這句話的意思,可以敘述一下問題點嗎?
src/js/formatDate.js
Outdated
function formatDate(date) { | ||
const formattedDate = new Date(date).toLocaleString('zh-TW', { | ||
year: 'numeric', | ||
month: '2-digit', | ||
day: '2-digit', | ||
hour: '2-digit', | ||
minute: '2-digit', | ||
hour12: false | ||
}) | ||
|
||
return formattedDate | ||
} | ||
|
||
module.exports = { | ||
formatDate | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在 utils 下有個 format.js,將所有 format 相關的 function 集中於那邊會比較適合
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
} | ||
] | ||
}) | ||
classInquiryData.sort((a, b) => a.id - b.id) | ||
|
||
console.dir(classInquiryData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.dir 需移除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
「須留意之後重構需把表內而外新增的 date、name 移除」只是多餘的欄位可以考慮移除而已 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以修改
} | ||
] | ||
}) | ||
classInquiryData.sort((a, b) => a.id - b.id) | ||
|
||
console.dir(classInquiryData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
src/js/formatDate.js
Outdated
function formatDate(date) { | ||
const formattedDate = new Date(date).toLocaleString('zh-TW', { | ||
year: 'numeric', | ||
month: '2-digit', | ||
day: '2-digit', | ||
hour: '2-digit', | ||
minute: '2-digit', | ||
hour12: false | ||
}) | ||
|
||
return formattedDate | ||
} | ||
|
||
module.exports = { | ||
formatDate | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GLTM!
修改 課前詢問與 userId 關聯,評分 date 調整
新增 回傳別名,頭像,時間
須留意之後重構需把表內而外新增的 date、name 移除