-
${comment_when(message.creation, true)}
-
${item_name}
-
-
${sender}:
-
${content}
+
+
+

+
${item_name}
+
+ ${received_messages}
@@ -84,5 +178,8 @@ function get_item_message_card_html(item) {
}
export {
- get_item_card_html
+ get_item_card_html,
+ get_local_item_card_html,
+ get_buying_item_message_card_html,
+ get_selling_item_message_card_html
}
diff --git a/erpnext/public/js/hub/components/items_container.js b/erpnext/public/js/hub/components/items_container.js
index 5db2c561a57..61b8af6b0b8 100644
--- a/erpnext/public/js/hub/components/items_container.js
+++ b/erpnext/public/js/hub/components/items_container.js
@@ -3,7 +3,7 @@ import { get_item_card_html } from './item_card';
function get_item_card_container_html(items, title='', get_item_html = get_item_card_html, action='') {
const items_html = (items || []).map(item => get_item_html(item)).join('');
const title_html = title
- ? `
`;
-}
+}
\ No newline at end of file
diff --git a/erpnext/public/js/hub/pages/subpage.js b/erpnext/public/js/hub/pages/subpage.js
index 07ea11e0d49..162aa52b294 100644
--- a/erpnext/public/js/hub/pages/subpage.js
+++ b/erpnext/public/js/hub/pages/subpage.js
@@ -1,6 +1,7 @@
export default class SubPage {
- constructor(parent, options) {
+ constructor(parent, ...options) {
this.$parent = $(parent);
+ this.options = options;
this.make_wrapper(options);
// generic action handler
diff --git a/erpnext/public/less/hub.less b/erpnext/public/less/hub.less
index 720a9d80603..779d45d90bc 100644
--- a/erpnext/public/less/hub.less
+++ b/erpnext/public/less/hub.less
@@ -192,24 +192,75 @@ body[data-route^="marketplace/"] {
margin-bottom: 20px;
}
- .item-message-card {
- height: 80px;
+ .hub-list-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border: 1px solid @border-color;
+ margin-bottom: 15px;
+ border-radius: 3px;
+ }
+
+ .hub-list-left {
+ display: flex;
+ align-items: center;
+ max-width: 90%;
+ }
+
+ .hub-list-right {
+ padding-right: 15px;
+ }
+
+ .hub-list-image {
+ width: 58px;
+ height: 58px;
+ border-right: 1px solid @border-color;
+
+ &::after {
+ font-size: 12px;
+ }
+ }
+
+ .hub-list-body {
+ padding: 12px 15px;
+ }
+
+ .hub-list-title {
+ font-weight: bold;
+ }
+
+ .hub-list-subtitle {
+ color: @text-muted;
+ }
+
+ .selling-item-message-card {
max-width: 500px;
- margin-bottom: 10px;
- padding: 10px;
- border-radius: 4px;
- .message-body {
- margin-left: 60px;
+ margin-bottom: 15px;
+ border-radius: 3px;
+ border: 1px solid @border-color;
+ .selling-item-detail {
+ overflow: auto;
+ .item-image {
+ float: left;
+ height: 80px;
+ width: 80px;
+ object-fit: contain;
+ margin: 5px;
+ }
+ .item-name {
+ margin-left: 10px;
+ }
}
- .item-image {
- float: left;
- height: 50px;
- width: 50px;
- object-fit: contain;
- // border-radius: 50%
- }
- .frappe-timestamp {
- float: right;
+ .received-message-container {
+ clear: left;
+ background-color: @light-bg;
+ .received-message {
+ border-top: 1px solid @border-color;
+ padding: 10px;
+ }
+ .frappe-timestamp {
+ float: right;
+ }
}
}