Advertisement
vitareinforce

formatting rumus salary component

Nov 10th, 2023
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. sortedKeys: function() {
  2. let sorted = {}
  3. Object.keys(this.rumusKomponen)
  4. .sort()
  5. .forEach(key => {
  6. sorted[key] = this.rumusKomponen[key]
  7. })
  8. let values = Object.values(sorted)
  9. let translatedValues = values.map(v => {
  10. if(v != null) {
  11. return '['+this.translateTable(this.translateColumn(v))+']'
  12. }
  13. })
  14. return translatedValues.join('')
  15. },
  16. sortedKeysIf: function() {
  17. let sorted = {}
  18. Object.keys(this.rumusKondisi)
  19. .sort()
  20. .forEach(key => {
  21. sorted[key] = this.rumusKondisi[key]
  22. })
  23. let values = Object.values(sorted)
  24. let translatedValues = values.map(v => {
  25. if(v != null) {
  26. return '['+this.translateTable(this.translateColumn(v))+']'
  27. }
  28. })
  29. return translatedValues.join('')
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement