Last active
March 25, 2020 11:41
-
-
Save wilcorrea/980fcfc8744426c97ae1e163d2cb0dfb to your computer and use it in GitHub Desktop.
resolvers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { dateFormat } from '@/sgu-glp/src/utils/date'; | |
const applyDateFormat = dateFormat(); | |
const formatDates = (data, keys) => { | |
fields.forEach(key => { | |
data[key] = applyDateFormat(data[key]) | |
}) | |
return data | |
} | |
const dadosGerais = data => ({ | |
...formatDates(data, [ | |
'dataInclusao', | |
'dataReinclusao', | |
'dataTransferenciaUnimed', | |
'dataInicioCarencia', | |
'dataExclusao', | |
'dataExclusaoProgramada', | |
'dataObito', | |
'dataSuspensao', | |
'dataValidadeCartao', | |
'dataEmissaoCartao' | |
]) | |
}); | |
export default { | |
dadosGerais, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment