Skip to content

Commit

Permalink
Merge pull request #220 from isd-sgcu/tee/fix-duplicate-invalid-date
Browse files Browse the repository at this point in the history
test: moment js
  • Loading branch information
TeeGoood authored Aug 4, 2024
2 parents 74e28af + b7b2628 commit 528a18b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"clsx": "^2.1.1",
"dayjs": "^1.11.12",
"framer-motion": "^11.3.8",
"moment": "^2.30.1",
"next": "14.2.4",
"next-image-zoom": "^1.1.7",
"next-qrcode": "^2.5.1",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/app/rpkm/staff/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { CheckIn } from '@/types/checkIn';
import { FRESHYNIGHT_EVENT, RPKM_DAY_1, RPKM_DAY_2 } from '@/utils/date';
import dayjs from 'dayjs';
import StudentCodeInput from '@/components/rpkm/staff/home/qrscanner/StudentCodeInput';
import moment from 'moment';

function Page() {
const [eventText, setEventText] = useState<string>('');
Expand Down Expand Up @@ -87,7 +88,12 @@ function Page() {
<div>
ผู้ใช้สแกน QR-code นี้แล้ว
<br />
{`เมื่อเวลา ${date.format('HH:mm')} น.`}
<div>{newCheckInData.checkIn.timestamp}</div>
<div> {`เมื่อเวลา ${date.format('HH:mm')} น.`}</div>
<div>
{' '}
{`momentjs: ${moment(newCheckInData.checkIn.timestamp).format('HH:mm')} น.`}
</div>
</div>
);
setErrorTopic('Already taken!');
Expand Down

0 comments on commit 528a18b

Please sign in to comment.