Skip to content

Commit

Permalink
few additions
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavv245 authored and Tanya Madaan committed Feb 8, 2024
1 parent 52f3196 commit 5560a45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,8 @@ module.exports = {
properties: {
short_desc: {
type: "string",
not: { const: { $data: "3/start/instructions/short_desc" } },
errorMessage: "cannot be same as PCC - ${3/start/instructions/short_desc}"
},
long_desc: {
type: "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ module.exports = {
code: {
type: "string",
enum: PCC_CODE,
const: { $data: "/confirm/0/message/order/fulfillments/0/start/instructions/code" }
},
name: {
type: "string",
},
short_desc: {
type: "string",
const: { $data: "/confirm/0/message/order/fulfillments/0/end/instructions/short_desc" }
},
long_desc: {
type: "string",
Expand Down Expand Up @@ -222,12 +224,15 @@ module.exports = {
code: {
type: "string",
enum: DCC_CODE,
const: { $data: "/confirm/0/message/order/fulfillments/0/end/instructions/code" }
},
name: {
type: "string",
},
short_desc: {
type: "string",
not: { const: { $data: "3/start/instructions/short_desc" } },
errorMessage: "cannot be same as PCC - ${3/start/instructions/short_desc}"
},
long_desc: {
type: "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const checkConfirm = (data, msgIdSet) => {
fulfillments.forEach((fulfillment) => {
let avgPickupTime= fulfillment?.start?.time?.duration;
console.log(avgPickupTime,dao.getValue(`${fulfillment?.id}-avgPickupTime`));
if(avgPickupTime && avgPickupTime!==dao.getValue(`${fulfillment?.id}-avgPickupTime`)){
if(avgPickupTime && dao.getValue(`${fulfillment?.id}-avgPickupTime`) && avgPickupTime!==dao.getValue(`${fulfillment?.id}-avgPickupTime`)){
cnfrmObj.avgPckupErr=`Average Pickup Time (fulfillments/start/time/duration) mismatches from the one provided in /on_search`
}
if (fulfillment["@ondc/org/awb_no"] && p2h2p) awbNo = true;
Expand Down

0 comments on commit 5560a45

Please sign in to comment.