totCnt 3자리 콤마 유틸 추가
This commit is contained in:
parent
63d6103858
commit
e53bddc04c
@ -12,6 +12,7 @@ import { queryStringFormatter, isEmptyArray } from '@/util/common-utils'
|
||||
import dayjs from 'dayjs'
|
||||
import isLeapYear from 'dayjs/plugin/isLeapYear' // 윤년 판단 플러그인
|
||||
dayjs.extend(isLeapYear)
|
||||
import { convertNumberToPriceDecimal } from '@/util/common-utils'
|
||||
import { appMessageStore, globalLocaleStore } from '@/store/localeAtom'
|
||||
import KO from '@/locales/ko.json'
|
||||
import JA from '@/locales/ja.json'
|
||||
@ -380,11 +381,11 @@ export default function Stuff() {
|
||||
<ul className="info-wrap">
|
||||
<li>
|
||||
전체
|
||||
<span>{gridCount}</span>
|
||||
<span>{convertNumberToPriceDecimal(gridCount)}</span>
|
||||
</li>
|
||||
<li>
|
||||
선택
|
||||
<span className="red">{selectedRowDataCount}</span>
|
||||
<span className="red">{convertNumberToPriceDecimal(selectedRowDataCount)}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { Input, RadioGroup, Radio, Button, Autocomplete, AutocompleteItem, Select, SelectItem, Checkbox, Textarea, button } from '@nextui-org/react'
|
||||
// import Select from 'react-dropdown-select'
|
||||
import Link from 'next/link'
|
||||
import { useAxios } from '@/hooks/useAxios'
|
||||
import { globalLocaleStore } from '@/store/localeAtom'
|
||||
@ -203,7 +204,7 @@ export default function StuffDetail() {
|
||||
// console.log('mode:::::', editMode)
|
||||
if (editMode === 'NEW') {
|
||||
const formData = form.getValues()
|
||||
console.log('폼::::::::::::', formData)
|
||||
// console.log('폼::::::::::::', formData)
|
||||
let errors = {}
|
||||
if (!_dispCompanyName || _dispCompanyName.trim().length === 0) {
|
||||
errors.dispCompanyName = true
|
||||
@ -250,7 +251,7 @@ export default function StuffDetail() {
|
||||
errors.installHeight = true
|
||||
}
|
||||
|
||||
console.log('errors::', errors)
|
||||
// console.log('errors::', errors)
|
||||
setIsFormValid(Object.keys(errors).length === 0)
|
||||
} else {
|
||||
// console.log('상세일때 폼체크')
|
||||
|
||||
@ -59,3 +59,10 @@ export const queryStringFormatter = (params = {}) => {
|
||||
})
|
||||
return queries.join('&')
|
||||
}
|
||||
|
||||
// 43000 --> 43,000
|
||||
export const convertNumberToPriceDecimal = (value) => {
|
||||
if (value) return Number(value).toLocaleString()
|
||||
else if (value === 0) return 0
|
||||
else return ''
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user