Skip to content

Conversation

@sergey-shablenko
Copy link
Contributor

Implement kitchen orders page

@sergey-shablenko
Copy link
Contributor Author

@sergey-shablenko
Copy link
Contributor Author

Copy link
Contributor

@Bilal-S Bilal-S left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shablenko-sednor
I removed the hotel branding and made some correction when room number is no longer there but we also need to remove the 60s automatic polling and replace the Slack key with a comment & only sent message when there is key.

</button>
</td>
<td class="text-right">${order.roomNumber || ""}</td>
<td class="text-right">${order.roomNumber == 'undefined' ? '100': order.roomNumber }</td>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is checking whether order.roomNumber is the string "undefined". I don't believe that is what you meant. Maybe you wanted to check whether order.roomNumber is undefined (i.e., not set or was set to undefined).

Suggested change
<td class="text-right">${order.roomNumber == 'undefined' ? '100': order.roomNumber }</td>
<td class="text-right">${order.roomNumber || "100"}</td>

In this case, if order.roomNumber is falsy (such as undefined or empty string), then it defaults to "100".

.map(itemRef => {
if (/^xb_room_number:/.test(itemRef)) {
roomNumber = itemRef.split(":")[1];
roomNumber = itemRef.split(":")[1];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes the whitespace at the end of the line.

Suggested change
roomNumber = itemRef.split(":")[1];
roomNumber = itemRef.split(":")[1];

@dhurlburtusa
Copy link

@Bilal-S @shablenko-sednor I made some suggestions for the recent changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants