- caaloghi, categorie
This commit is contained in:
@@ -8582,8 +8582,41 @@ export const tools = {
|
||||
}
|
||||
|
||||
return color
|
||||
}
|
||||
},
|
||||
|
||||
getIconByVersione (versione: number ) {
|
||||
let str = ''
|
||||
if (versione === shared_consts.VERSIONE.NUOVO)
|
||||
str = 'fas fa-book'
|
||||
else if (versione === shared_consts.VERSIONE.USATO)
|
||||
// Versione Libro usato
|
||||
str = 'fas fa-book-open'
|
||||
else if (versione === shared_consts.VERSIONE.DOWNLOAD)
|
||||
str = 'fas fa-file-download'
|
||||
else if (versione === shared_consts.VERSIONE.DVD)
|
||||
str = 'fas fa-film'
|
||||
else if (versione === shared_consts.VERSIONE.PDF)
|
||||
str = 'fas fa-file-pdf'
|
||||
else if (versione === shared_consts.VERSIONE.EPUB)
|
||||
// Libro elettronico EPUB
|
||||
str = 'fas fa-book-open-reader'
|
||||
else if (versione === shared_consts.VERSIONE.DVD)
|
||||
str = 'fas fa-video'
|
||||
else if (versione === shared_consts.VERSIONE.STREAMING)
|
||||
str = 'fas fa-stream'
|
||||
|
||||
return str
|
||||
},
|
||||
|
||||
// get the integer part, no round, of a decimal number
|
||||
getIntPart(number: number) {
|
||||
return Math.trunc(number)
|
||||
},
|
||||
|
||||
// get the last 2 digit fraction part, of a decimal number
|
||||
getDecPart2Digit(number: number) {
|
||||
return Math.round(number * 100) % 100
|
||||
}
|
||||
|
||||
// FINE !
|
||||
|
||||
|
||||
Reference in New Issue
Block a user