Skip to content

Commit

Permalink
VCST-2401: use ui-scrol-drop-down on csv export blade (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
basilkot committed Dec 5, 2024
1 parent 0637113 commit 902a5c1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@
<ItemGroup>
<ProjectReference Include="..\VirtoCommerce.CatalogCsvImportModule.Core\VirtoCommerce.CatalogCsvImportModule.Core.csproj" />
</ItemGroup>

<!--Workaround for vulnerable transitive packages-->
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,9 @@ angular.module('virtoCommerce.catalogCsvImportModule')
$scope.formScope = form;
};

pricelists.search({ take: 1000 }, function (result) {
$scope.pricelists = _.filter(result.results,
function (x) {
return _.some(x.assignments,
function (y) {
return y.catalogId === blade.catalog.id
})
});
});
$scope.blade.fetchPricelists = function (criteria) {
return pricelists.search(criteria);
}

$scope.blade.headIcon = 'fa fa-file-archive-o';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="blade-static __bottom">
<div class="blade-static __bottom">
<button class="btn" ng-click="startExport()" ng-disabled="blade.notification">
{{ 'catalogCsvImportModule.commands.start-export' | translate }}
</button>
Expand All @@ -22,14 +22,12 @@
</div>
<div class="form-group">
<label class="form-label">{{ 'catalogCsvImportModule.blades.catalog-CSV-export.labels.select-pricelist' | translate }}</label>
<div class="form-input">
<ui-select ng-model="blade.pricelistId">
<ui-select-match placeholder="{{ 'catalogCsvImportModule.blades.catalog-CSV-export.placeholders.select-pricelist' | translate }}">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="x.id as x in pricelists | filter: { name: $select.search }">
<span ng-bind-html="x.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</div>
<div class="form-input">
<ui-scroll-drop-down ng-model="blade.pricelistId"
data="blade.fetchPricelists(criteria)"
placeholder="'catalogCsvImportModule.blades.catalog-CSV-export.placeholders.select-pricelist'">
</ui-scroll-drop-down>
</div>
</div>

<p ng-class="{'no-data': blade.notification.description}" ng-if="!blade.notification" class="text">{{ 'catalogCsvImportModule.blades.catalog-CSV-export.labels.note' | translate }}</p>
Expand Down

0 comments on commit 902a5c1

Please sign in to comment.