Closed onOffice-Web closed 1 month ago
@fredericalpers These are the solutions, Please confirm for us:
Default order: "New", "Top offer", "No selection", "Sold", "Rented", "Reserved", "Reference".
Rename the label of the selection field "Sort by" to "Sort criteria within same selection".
I. Case 1: All properties have only a tag => The order of the properties in the frontend the same as the order of tags in the backend. ex: Property 1 (123456783) has the value "New" Property 2 (162323) has the value "No selection" Property 3 (117289) has the value "Rented" Property 4 (123456784) has the value "Top Offer"
The order of tags in the backend: "New", "Top offer", "No selection", "Sold", and "Rented". => The order of the properties in the frontend: Property 1, Property 4, Property 2, Property 3 https://github.com/onOffice-Web-Org/oo-wp-plugin/assets/104892108/d4de8845-993d-4c42-a428-aee10e7922b2
II.Case 2: A property has more than one marker. Property 1 (123456783): has the values "New" and "Reference", then the property is considered "New". Property 2 (162323): None of the other marker fields apply. Property 3 (117289): has the values "Rented" and "Reference", then the property is considered to be "Rented". Property 4 (123456784): has the values "Top Offer" and "Sold", then the property is considered "Top Offer".
=> Find the "considered" tag to return to the same problem as case 1. Property 1 is considered "New". Property 2 is considered to be "No selection" Property 3 is considered a "Rented". Property 4 is considered a "Top Offer". => Algorithm "Sort by" same as case 1 The order of tags in the backend: "New", "Top offer", "No selection", "Sold", and "Rented". => The order of the properties in the frontend: Property 1, Property 4, Property 2, Property 3 https://github.com/onOffice-Web-Org/oo-wp-plugin/assets/104892108/85c29be9-cc68-41fd-af40-3d063e9ee418
III. I have a few questions:
Please specify what we will use the label "No marker" or "No selection"?
In the Enterprise system label of "Hereditary lease" => "rented" label of "Lease" => "rented"
In the master branch label of "Hereditary lease" => "sold" label of "Lease" => "sold" =>Please specify which label is showing correctly?
"No marker" -> If none of the other marker fields apply.=> What does it mean? As I can see in the Enterprise data, there are other tags not in the list "New", "Top offer", "No selection", "Sold", "Rented", "Reserved", "Reference", in such cases, how do we sort the items ?
I would use https://jqueryui.com/sortable/ => The user can adjust the arrangement via drag-and-drop
👍
Default order: "New", "Top offer", "No selection", "Sold", "Rented", "Reserved", "Reference".
👍
Rename the label of the selection field "Sort by" to "Sort criteria within same selection".
⚠Please do not rename or change the functionality of the current "sort by". The changes are an addition as seen in Screenshot (3) and (4). The select "sorting" should have a new item named "Marked Properties". If "Marked properties" is selected, the fields below will appear.
I. Case 1: All properties have only a tag II.Case 2: A property has more than one marker.
The order of the properties in the frontend is correct.
Please specify what we will use the label "No marker" or "No selection"?
In frontend there obviously shouldn't be a label on the property cards. For the backend please use "No marker" as seen in screenshot (4). Pleas do not change anything in the template when this is added otherwise it is no longer backwards compatible.
Different label for "hereditary lease" and "lease" in onOffice enterprise and plugin?
The plugin should display the same as onOffice enterprise.
"No marker" -> If none of the other marker fields apply.=> What does it mean?
"No marker" are the properties which do not have a specific "Marketing status" set in onOffice enterprise. Which means none of them are labeled as "top offer" or "new" etc.
As I can see in the Enterprise data, there are other tags not in the list "New", "Top offer", "No selection", "Sold", "Rented", "Reserved", "Reference", in such cases, how do we sort the items ?
As mentioned above the changes should not be made to the current "sort by" instead added as a new selection.
Regarding the question in our meeting, when there is more than one page, the sorting should be as followed:
E.g. 20 properties - 5 per page. 8 are marked as top offer. which should make them appear first. In this case page 1 would only display top offers, page 2 would display 3 top offers followed by the next selected sorting criteria property. Sorting as seen in screenshot (4)
@yeneastgate If you have any further questions, let me know :)
@fredericalpers
As mentioned above the changes should not be made to the current "sort by" instead added as a new selection.
I tried to implement adding a new selection.
E.g. 20 properties - 5 per page. 8 are marked as top offer. which should make them appear first. In this case page 1 would only display top offers, page 2 would display 3 top offers followed by the next selected sorting criteria property. Sorting as seen in screenshot (4)
To meet this Desired state: The result API must return a list which the properties are grouped by tags. I found that API doc has "sortby" parameters, support return the properties are grouped by those tags (New,Top offer, Reserved, Reference) In source code, we add this lines: 'sortby' => ["top_angebot" => "DESC", "neu" => "DESC", "referenz" => "DESC", "reserviert" => "DESC"]
E.g. 20 properties, the API results will return a list which the properties are grouped by tags (8 top offers => 4 new => 3 referenz => 5 reserviert) You can see video demo.
However, currently the "sortby" parameters do not support those tags(Sold, Rented,No marker). So, the only solutions I can suggest is that: Please update "read estate" API for "sortby" parameters so that it can support those tags (Sold, Rented,No marker). Please check with your IT department and let us know your opinion about this matter. Thanks!
@yeneastgate I will check it and get back to you asap
@yeneastgate The fields can be obtained the following:
https://tools.onofficeweb.com/api-client/
If you have any further questions, please let me know.
The fields can be obtained the following:
- Properties that are rented or sold are obtained with "sold=1"
- Properties that are only rented out also need marketing type="miete".
- Properties that are only sold also need marketing type="kauf".
onOffice API Testing Tool If you have any further questions, please let me know.
Yes, I wil try it to continue to solve issue, thank you very much!
- Properties that are rented or sold are obtained with "sold=1"
- Properties that are only rented out also need marketing type="miete".
- Properties that are only sold also need marketing type="kauf".
@fredericalpers Based on your suggestion, I used "verkauft" => "DESC" for "sortby" parameters.
EX:
'sortby' => ["verkauft" => "DESC", "top_angebot" => "DESC", "referenz" => "DESC"]
This is the result page 1: Page 2
As shown in the two images above, the estate will automatically be sorted in the following order: Rented => Sold => Top Offer.
@fredericalpers
EX:
'sortby' => ["verkauft" => "ASC", "vermarktungsart" => "ASC" , "top_angebot" => "DESC"]
'sortby' => ["verkauft" => "ASC", "vermarktungsart" => "DESC" , "top_angebot" => "DESC"]
However, "vermarktungsart" also has other values such as "erbpacht", ..
=> Therefore, despite adding "vermarktungsart" => "DESC" or "vermarktungsart" => "ASC", the sorting result is still unexpected.
Please check the API results above with different "vermarktungsart" types and let me know your opinions.
@yeneastgate Please go ahead and implement it as suggested by you. The other "vermarktungsart" as "erbpacht" or "pacht" can be ignored for now.
@fredericalpers We have tried the solution Which we have suggested before. This is the result:
example: Case 1: New, Top offer, Reference, Reserved, Sold, Rented, No marker.
Case 2: You can reverse the position of Top offer before New but still have to fix the position of the remaining 3 tags: Top Offer, New, Reference, Reserved, Sold, Rented, No marker
Please watch my video demo: https://files.fm/u/6htd2qyvb
@yeneastgate just to clarify one more time.. it is possible to create a fixed order, that can be selected in a dropdown instead of making them all changable as shown in https://files.fm/u/6htd2qyvb#/view/dkq8evgbc ?
e.g. we add the following fixed orders to a dropdown:
"top_angebot" => "Top offer" "neu" => "New" "no_marker" => "No marker" (normal properties with no specific status) "reserviert" => "Reserved" "kauf" => "Sold" "miete" => "Rented" "referenz" => "Reference''
"top_angebot" => "Top offer" "neu" => "New" "no_marker" => "No marker" (normal properties with no specific status) "reserviert" => "Reserved" "referenz" => "Reference'' "kauf" => "Sold" "miete" => "Rented"
@yeneastgate after finishing up v4.21, please investigate this before starting with v4.22. Thank you :)
after finishing up v4.21, please investigate this before starting with v4.22. Thank you :)
I got it.
@fredericalpers I have a solution for this issue. Please watch the demo video
Do you confirm this feature worked as Desired state? => If you agree with this solution, I will continue to implement and finish it.
@fredericalpers I have a solution for this issue. Please watch the demo video
Do you confirm this feature worked as Desired state? => If you agree with this solution, I will continue to implement and finish it.
Unfortunately the video is not available anymore. I was thinking about something like in the screenshot below.
Unfortunately the video is not available anymore.
@fredericalpers You can review the demo video. https://files.fm/u/3etd843vqz#/view/b2gagw9at9
I was thinking about something like in the screenshot below.
If you want, We will implement it as shown above.
@yeneastgate Could you please provide a summary of the problem? Additionally, I'd appreciate it if you could explain why the original request or solution is not possible. This information will help me understand the context better and allow me to rework on it more effectively.
Looking forward to your response.
@fredericalpers I will check and response asap
@fredericalpers I found that:
backend: we have implemented the UI according to the order property tags as required
frontend: the properties have been arranged according to the order property tags set in the admin
However, with the current solution, it can only be done with number of properties less than 500, because in the current solution, we need to call the Read Estate API to get all the data Please check the video evidence below: https://files.fm/f/hjnr4ttyrt
@yeneastgate thank you for the summary on this one more time. We will review this as soon as possible :)
Discussed in https://github.com/onOffice-Web-Org/oo-wp-plugin/discussions/486