digit grouping type supports Indian Number Grouping
This commit is contained in:
+7
-4
@@ -69,10 +69,11 @@ type DigitGroupingType byte
|
||||
|
||||
// Digit Grouping Type
|
||||
const (
|
||||
DIGIT_GROUPING_TYPE_DEFAULT DigitGroupingType = 0
|
||||
DIGIT_GROUPING_TYPE_NONE DigitGroupingType = 1
|
||||
DIGIT_GROUPING_TYPE_THOUSANDS_SEPARATOR DigitGroupingType = 2
|
||||
DIGIT_GROUPING_TYPE_INVALID DigitGroupingType = 255
|
||||
DIGIT_GROUPING_TYPE_DEFAULT DigitGroupingType = 0
|
||||
DIGIT_GROUPING_TYPE_NONE DigitGroupingType = 1
|
||||
DIGIT_GROUPING_TYPE_THOUSANDS_SEPARATOR DigitGroupingType = 2
|
||||
DIGIT_GROUPING_TYPE_INDIAN_NUMBER_GROUPING DigitGroupingType = 3
|
||||
DIGIT_GROUPING_TYPE_INVALID DigitGroupingType = 255
|
||||
)
|
||||
|
||||
// String returns a textual representation of the digit grouping type enum
|
||||
@@ -84,6 +85,8 @@ func (d DigitGroupingType) String() string {
|
||||
return "None"
|
||||
case DIGIT_GROUPING_TYPE_THOUSANDS_SEPARATOR:
|
||||
return "Thousands Separator"
|
||||
case DIGIT_GROUPING_TYPE_INDIAN_NUMBER_GROUPING:
|
||||
return "Indian Number Grouping"
|
||||
case DIGIT_GROUPING_TYPE_INVALID:
|
||||
return "Invalid"
|
||||
default:
|
||||
|
||||
+1
-1
@@ -200,7 +200,7 @@ type UserProfileUpdateRequest struct {
|
||||
FiscalYearFormat *core.FiscalYearFormat `json:"fiscalYearFormat" binding:"omitempty,min=0,max=5"`
|
||||
DecimalSeparator *core.DecimalSeparator `json:"decimalSeparator" binding:"omitempty,min=0,max=3"`
|
||||
DigitGroupingSymbol *core.DigitGroupingSymbol `json:"digitGroupingSymbol" binding:"omitempty,min=0,max=4"`
|
||||
DigitGrouping *core.DigitGroupingType `json:"digitGrouping" binding:"omitempty,min=0,max=2"`
|
||||
DigitGrouping *core.DigitGroupingType `json:"digitGrouping" binding:"omitempty,min=0,max=3"`
|
||||
CurrencyDisplayType *core.CurrencyDisplayType `json:"currencyDisplayType" binding:"omitempty,min=0,max=11"`
|
||||
CoordinateDisplayType *core.CoordinateDisplayType `json:"coordinateDisplayType" binding:"omitempty,min=0,max=6"`
|
||||
ExpenseAmountColor *AmountColorType `json:"expenseAmountColor" binding:"omitempty,min=0,max=4"`
|
||||
|
||||
@@ -321,7 +321,7 @@ func (s *UserService) UpdateUser(c core.Context, user *models.User, modifyUserLa
|
||||
updateCols = append(updateCols, "digit_grouping_symbol")
|
||||
}
|
||||
|
||||
if core.DIGIT_GROUPING_TYPE_DEFAULT <= user.DigitGrouping && user.DigitGrouping <= core.DIGIT_GROUPING_TYPE_THOUSANDS_SEPARATOR {
|
||||
if core.DIGIT_GROUPING_TYPE_DEFAULT <= user.DigitGrouping && user.DigitGrouping <= core.DIGIT_GROUPING_TYPE_INDIAN_NUMBER_GROUPING {
|
||||
updateCols = append(updateCols, "digit_grouping")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user