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
{ | |
sessionMeta:{ | |
idUsuario: '1234', | |
idCarrinho: '4567', | |
opcaoDeFrete: 'A_JATO' | |
}, | |
components: [...], | |
screen: 'PAGAMENTO' | |
} |
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
// Chamada para criar sessão no BFF | |
{ | |
idUsuario: '1234', | |
idCarrinho: '4567', | |
opcaoDeFrete: 'A_JATO' | |
} |
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
type PrimeAlertMessageProps = { | |
payload: { | |
mensagem: string | |
}, | |
behaviour: 'VISIVEL' | 'DESABILITADO' | |
} | |
const PrimeAlertMessage: React.FC<PrimeAlertMessageProps> = ({payload, behaviour}) => { | |
switch(behaviour) { | |
case 'VISIVEL': | |
return <p>{payload.mensagem}</p> |
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
<div | |
data-ng-if=" | |
(cache.freightOptions.LASA && | |
cache.customerPrimeInfoStatus !== 'ASSINANTE') && | |
(cache.togglePrimePricing && cache.shouldShowPrimeOffer) || | |
cache.shouldDisplayPrimeInfoOnApp"> | |
<p>{{::'freight.prime.alertMessage_01' | translate}}</p> | |
</div> |
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
// Responsta do BFF - *MUDAR_FRETE* | |
{ | |
sessionMeta:{ | |
idUsuario: '1234', | |
idCarrinho: '4567', | |
opcaoDeFrete: 'MAIS_BARATO' | |
}, | |
components: [ | |
{ | |
rel: 'sumario', |
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
// Chamada para o BFF - *MUDAR_FRETE* | |
sessionMeta:{ | |
idUsuario: '1234', | |
idCarrinho: '4567', | |
opcaoDeFrete: 'A_JATO' | |
}, | |
payload: { | |
opcaoDeFreteSelecionada: 'MAIS_BARATO' | |
}, | |
type: 'MUDAR_FRETE' |
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
// Chamada para criar sessão no BFF com carrinho que não tenha desconto | |
{ | |
idUsuario: '1234', | |
idCarrinho: '7890', | |
opcaoDeFrete: 'A_JATO' | |
} | |
// Responsta de criação de sessão | |
{ | |
sessionMeta:{ | |
idUsuario: '1234', |
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
// Chamada para criar sessão no BFF com carrinho que tenha desconto | |
{ | |
idUsuario: '1234', | |
idCarrinho: '4567', | |
opcaoDeFrete: 'A_JATO' | |
} | |
// Responsta de criação de sessão | |
{ | |
sessionMeta:{ | |
idUsuario: '1234', |
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
export const runValidationIfFieldExists = validationFunction => (objectPath, object) => { | |
const NOT_FOUND_PATH_IN_OBJECT = null; | |
const checkIfObjectPathExistis = pathOr(NOT_FOUND_PATH_IN_OBJECT, objectPath, object); | |
return checkIfObjectPathExistis ? validationFunction(checkIfObjectPathExistis) : ''; | |
}; |
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
function save_data(data, id) { | |
if (!window.localStorage || !window.JSON || !id) { | |
return; | |
} | |
window.localStorage.setItem(id, JSON.stringify(data)); | |
} | |
function get_data(key) { |
NewerOlder