Skip to content

Commit

Permalink
sorted bags by capacity and rename columns titles
Browse files Browse the repository at this point in the history
  • Loading branch information
KizerovDmitriy committed Dec 17, 2024
1 parent 09c82ae commit 7a2cc34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public TableParamsDto getParametersForOrdersTable(String uuid) {
new ColumnDTO(new TitleDto("select", "Вибір", "Select"), "", 20, true, true, false, 0,
EditType.CHECKBOX,
new ArrayList<>(), ""),
new ColumnDTO(new TitleDto("id", "Номер замовлення", "Order number"), "id", 20, true, false, false,
new ColumnDTO(new TitleDto("id", " замовлення", "Order "), "id", 20, true, false, false,
1,
EditType.READ_ONLY, new ArrayList<>(), ordersInfo),
new ColumnDTO(new TitleDto(ORDER_STATUS, "Статус замовлення", "Order status"), ORDER_STATUS, 20,
Expand Down Expand Up @@ -204,8 +204,8 @@ public TableParamsDto getParametersForOrdersTable(String uuid) {
false, 15,
EditType.READ_ONLY, new ArrayList<>(), exportAddress),
new ColumnDTO(
new TitleDto(ADDRESS_COMMENT, "Коментар до адреси від клієнта",
"Comment to address from the client"),
new TitleDto(ADDRESS_COMMENT, "Коментар до адреси",
"Comment to address"),
ADDRESS_COMMENT, 20, false, true, false, 16, EditType.INLINE, new ArrayList<>(),
exportAddress),
new ColumnDTO(new TitleDto("mixedWaste120L", "Мікс 120л", "Mix 120l"), "mixedWaste120L",
Expand All @@ -225,16 +225,16 @@ public TableParamsDto getParametersForOrdersTable(String uuid) {
EditType.READ_ONLY, new ArrayList<>(), orderDetails),
new ColumnDTO(new TitleDto("totalOrderSum", "Сума замовлення", "Total order sum"), "totalOrderSum",
20, false, true, false, 18, EditType.READ_ONLY, new ArrayList<>(), orderDetails),
new ColumnDTO(new TitleDto("orderCertificateCode", "Номер сертифікату", "Order certificate code"),
new ColumnDTO(new TitleDto("orderCertificateCode", " сертифікату", "Order certificate code"),
"orderCertificateCode",
20, false, true, false, 19, EditType.READ_ONLY, new ArrayList<>(), orderDetails),
new ColumnDTO(new TitleDto("generalDiscount", "Загальна знижка", "General discount"),
"generalDiscount", 20, false, true, false, 20, EditType.READ_ONLY, new ArrayList<>(), orderDetails),
new ColumnDTO(new TitleDto("amountDue", "Сума до оплати", "Amount due"), "amountDue", 20,
false, true, false, 21, EditType.READ_ONLY, new ArrayList<>(), orderDetails),
new ColumnDTO(
new TitleDto(CLIENT_COMMENT, "Коментар до замовлення від клієнта",
"Comment to the order from the client"),
new TitleDto(CLIENT_COMMENT, "Коментар до замовлення",
"Comment to the order"),
CLIENT_COMMENT, 20, false, true, false, 22, EditType.INLINE, new ArrayList<>(),
ordersInfo),
new ColumnDTO(new TitleDto("totalPayment", "Оплата", "Total payment"),
Expand All @@ -245,7 +245,7 @@ public TableParamsDto getParametersForOrdersTable(String uuid) {
false, true, true, 24, EditType.DATE, new ArrayList<>(), exportDetails),
new ColumnDTO(new TitleDto(TIME_OF_EXPORT, "Час вивезення", "Time of export"), TIME_OF_EXPORT, 20,
false, true, false, 25, EditType.TIME, new ArrayList<>(), exportDetails),
new ColumnDTO(new TitleDto("idOrderFromShop", "Номер замовлення з магазину", "Id order from shop"),
new ColumnDTO(new TitleDto("idOrderFromShop", " замовлення з магазину", "Id order from shop"),
"idOrderFromShop",
20, false, true, false, 26, EditType.READ_ONLY, new ArrayList<>(), orderDetails),
new ColumnDTO(new TitleDto(RECEIVING, "Станція приймання", "Receiving station"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ private UserPointsAndAllBagsDto getUserPointsAndAllBagsDtoByTariffIdAndUserPoint
Integer userPoints) {
var bagTranslationDtoList = bagRepository.findAllActiveBagsByTariffsInfoId(tariffId).stream()
.map(bag -> modelMapper.map(bag, BagTranslationDto.class))
.collect(toList());
.sorted(Comparator.comparing(BagTranslationDto::getCapacity).reversed())
.toList();
return new UserPointsAndAllBagsDto(bagTranslationDtoList, userPoints);
}

Expand Down

0 comments on commit 7a2cc34

Please sign in to comment.