style: lint
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 7m39s

This commit is contained in:
Mihajlo Medjedovic
2023-07-28 20:03:58 +02:00
parent e48e47bc63
commit 5bb55e6484
3 changed files with 13 additions and 13 deletions

View File

@ -63,8 +63,8 @@ import {
} from './utils/renderers.utils'
import { isStringDecimal, isStringNumber } from './utils/types.utils'
import { LicenceService } from '../services/licence.service'
import * as numbro from 'numbro';
import * as languages from 'numbro/dist/languages.min';
import * as numbro from 'numbro'
import * as languages from 'numbro/dist/languages.min'
@Component({
selector: 'app-editor',
@ -365,7 +365,8 @@ export class EditorComponent implements OnInit, AfterViewInit {
private hotRegisterer: HotTableRegisterer
) {
const lang = languages[window.navigator.language]
if (lang) numbro.default.registerLanguage(languages[window.navigator.language])
if (lang)
numbro.default.registerLanguage(languages[window.navigator.language])
this.hotRegisterer = new HotTableRegisterer()

View File

@ -1,22 +1,21 @@
import { DcValidation } from '../models/dc-validation.model'
import * as languages from 'numbro/dist/languages.min';
import * as languages from 'numbro/dist/languages.min'
/**
* Applying the numeric formats based on the browser locale/language
* @param rules rules to be updated
*/
export const applyNumericFormats = (
rules: DcValidation[]
): DcValidation[] => {
export const applyNumericFormats = (rules: DcValidation[]): DcValidation[] => {
const lang = languages[window.navigator.language]
if (!lang) return rules
for (let rule of rules) {
if (rule.type === 'numeric') rule.numericFormat = {
pattern: '0,0',
culture: window.navigator.language // use this for EUR (German),
// more cultures available on http://numbrojs.com/languages.html
}
if (rule.type === 'numeric')
rule.numericFormat = {
pattern: '0,0',
culture: window.navigator.language // use this for EUR (German),
// more cultures available on http://numbrojs.com/languages.html
}
}
return rules

View File

@ -18,4 +18,4 @@ In any case, you must not make any such use of this software as to develop softw
UNLESS EXPRESSLY AGREED OTHERWISE, 4GL APPS PROVIDES THIS SOFTWARE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO LEGAL THEORY, SHALL 4GL APPS BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM USE OR INABILITY TO USE THIS SOFTWARE.
`
`