-
Notifications
You must be signed in to change notification settings - Fork 1
chore(calculate-shipping): add product list to validate rule #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| "product_ids": { | ||
| "title": "Lista de produtos selecionados", | ||
| "description": "Se preenchido, a regra de envio estará disponível apenas se pelo menos um destes produtos estiver no carrinho", | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string", | ||
| "pattern": "^[a-f0-9]{24}$", | ||
| "title": "ID do produto" | ||
| } | ||
| }, | ||
| "all_product_ids": { | ||
| "type": "boolean", | ||
| "title": "Checar todos os produtos", | ||
| "description": "Se ativo, a regra será disponibilizada apenas se todos os itens do carrinho estiverem na lista de produtos selecionados", | ||
| "default": false | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esse trem vai ser pouco usado, deveria estar no final da config da regra
| rule && | ||
| (!rule.service_code || rule.service_code === coProduto) && | ||
| checkZipCode(rule) && | ||
| (!rule.product_ids || hasProduct) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| (!rule.product_ids || hasProduct) && | |
| (!rule.product_ids || !rule.product_ids.length || hasProduct) && |
| "all_product_ids": { | ||
| "type": "boolean", | ||
| "title": "Checar todos os produtos", | ||
| "description": "Se ativo, a regra será disponibilizada apenas se todos os itens do carrinho estiverem na lista de produtos selecionados", | ||
| "default": false | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precisa mesmo dessa segunda opção aqui? Quer dizer, tem cenário pra ambos os casos? Com algum produto na lista e com todos os produtos na lista?
No description provided.