Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarincev committed Oct 10, 2017
2 parents d35dd6e + 6853bed commit 003cf8b
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 121 deletions.
4 changes: 2 additions & 2 deletions CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
[assembly: AssemblyProduct("VirtoCommerce Subscription Module")]
[assembly: AssemblyCopyright("Copyright © VirtoCommerce 2011-2017")]

[assembly: AssemblyFileVersion("1.0.3.0")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.4.0")]
[assembly: AssemblyVersion("1.0.4.0")]

#if DEBUG

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"subscription": {
"main-menu-title": "Abonnemente",
"blades": {
"subscription-list": {
"title": "Abonnements",
"labels": {
"new-filter": "Neuen Filter hinzufügen",
"unnamed-filter": "Unbenannter Filter",
"number": "Anzahl",
"status": "Status",
"balance": "Kontostand",
"customer": "Teilnehmer",
"startDate": "Periodenstart",
"endDate": "Periodende"
},
"placeholders": {
"select-filter": "Filter wählen"
}
},
"filter-detail": {
"subtitle": "Filter bearbeiten",
"new-title": "Neuer Filter",
"new-subtitle": "Neuen Filter erstellen",
"labels": {
"name": "Name des Filters",
"name_": "Wie werden Sie diesen Filter nennen?",
"criteria": "Filterkriterien",
"from": "Aktiv ab",
"to": "Aktiv bis"
},
"placeholders": {
"all": "Nicht angegeben"
}
},
"subscription-detail": {
"title": "Abonnement {{number}}",
"subtitle": "Abonnementdetails und zugehörige Dokumente",
"labels": {
"status": "Status",
"balance": "Kontostand",
"billing-date": "Nächster Rechnungsdatum",
"trial-expiration": "Ablauf des Verfallsdatums",
"expiration": "Ablaufdatum des Abonnements",
"employee": "Neue Bestellung zuordnen zu",
"number": "Anzahl",
"coupon-code": "Gutscheincode",
"prorate": "Prorate Änderungen"
}
},
"schedule-detail": {
"title": "Auto-Auftragsablaufplan",
"title-new": "Neue automatische auftragsablaufplan",
"subtitle-new": "Neue automatische Erstellung Auftragsablaufplan",
"labels": {
"charge-every": "Bestellen jede",
"trial-period": "Zeitraum (Tage)",
"charge-count": "Abonnement endet nach Anzahl der Bestellungen",
"grace-period": "Frist (in Tagen)"
},
"placeholders": {
"select": "Wählen Sie aus..."
}
},
"subscriptionOrder-list": {
"title": "Abonnement Bestellungen"
}
},
"widgets": {
"subscription-orders": {
"title": "Bestellungen"
},
"orderDynamicProperty": {
"title": "Um dynamische Eigenschaften"
},
"product-schedule": {
"no-schedule": "Auto-auftragsablaufplan nicht definiert",
"info": "Auto - um jeden {{intervalCount}} {{interval}}"
},
"order-subscription": {
"title": "Öffene Abonnement {{ number }}",
"title-no": "Nicht im Abonnement"
},
"notificationsWidget": {
"title": "Benachrichtigung",
"blade-subtitle": "Benachrichtigungsservice",
"blade-title": "Abonnement Benachrichtigungstypliste"
},
"notificationsLogWidget": {
"title": "Benachrichtigungsprotokoll",
"blade-subtitle": "Benachrichtigungsprotokoll",
"blade-title": "Abonnement das Senden von Benachrichtigungen anmelden"
}
},
"dialogs": {
"subscription-delete": {
"title": "Bestätigung löschen",
"message": "Möchten Sie die ausgewählten Abonnements löschen?",
"warning": "WARNUNG: Diese Änderung ist endgültig und kann nicht rückgängig gemacht werden. Es kann zu Datenverlust führen.",
"instruction": "Geben Sie 'Ja' ein um zu löschen."
},
"subscription-save": {
"title": "Änderungen speichern",
"message": "Das Abonnement wurde geändert. Möchten Sie die Änderungen speichern?"
},
"schedule-delete": {
"title": "Bestätigung löschen",
"message": "Möchten Sie diese Bestellung Zeitplan wirklich löschen?"
},
"schedule-save": {
"title": "Änderungen speichern",
"message": "Der Zeitplan wurde geändert. Möchten Sie die Änderungen speichern?"
},
"new-order": {
"title": "Bestätigung",
"message": "Eine neue Bestellung für dieses Abonnement anlegen?"
}
},
"commands": {
"new-order": "Bestellung anlegen"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
var blade = $scope.blade;
blade.updatePermission = 'subscription:update';
blade.customerOrder = {};
blade.toolbarCommands = [];

blade.refresh = function () {
if (blade.id === 'operationDetail') {
Expand Down Expand Up @@ -34,6 +35,8 @@
subtitle: 'subscription.blades.subscription-detail.subtitle'
});

initToolbarCommands();

blade.isLocked = blade.currentEntity.isCancelled;
blade.isLoading = false;
};
Expand Down Expand Up @@ -98,122 +101,124 @@

$scope.setForm = function (form) { $scope.formScope = form; };

blade.toolbarCommands = [
{
name: "orders.commands.new-document", icon: 'fa fa-plus',
executeMethod: function () {
var newBlade = {
id: "newOperationWizard",
customerOrder: blade.customerOrder,
currentEntity: blade.currentEntity,
stores: blade.stores,
availableTypes: blade.knownChildrenOperations,
title: "orders.blades.newOperation-wizard.title",
subtitle: 'orders.blades.newOperation-wizard.subtitle',
controller: 'virtoCommerce.orderModule.newOperationWizardController',
template: 'Modules/$(VirtoCommerce.Orders)/Scripts/wizards/newOperation/newOperation-wizard.tpl.html'
};
bladeNavigationService.showBlade(newBlade, blade);
function initToolbarCommands() {
blade.toolbarCommands = [
{
name: "orders.commands.new-document", icon: 'fa fa-plus',
executeMethod: function () {
var newBlade = {
id: "newOperationWizard",
customerOrder: blade.customerOrder,
currentEntity: blade.currentEntity,
stores: blade.stores,
availableTypes: blade.knownChildrenOperations,
title: "orders.blades.newOperation-wizard.title",
subtitle: 'orders.blades.newOperation-wizard.subtitle',
controller: 'virtoCommerce.orderModule.newOperationWizardController',
template: 'Modules/$(VirtoCommerce.Orders)/Scripts/wizards/newOperation/newOperation-wizard.tpl.html'
};
bladeNavigationService.showBlade(newBlade, blade);
},
canExecuteMethod: function () {
return !blade.isLocked && _.any(blade.knownChildrenOperations);
},
permission: blade.updatePermission
},
canExecuteMethod: function () {
return !blade.isLocked && _.any(blade.knownChildrenOperations);
{
name: "platform.commands.save", icon: 'fa fa-save',
executeMethod: $scope.saveChanges,
canExecuteMethod: canSave,
permission: blade.updatePermission
},
permission: blade.updatePermission
},
{
name: "platform.commands.save", icon: 'fa fa-save',
executeMethod: $scope.saveChanges,
canExecuteMethod: canSave,
permission: blade.updatePermission
},
{
name: "platform.commands.reset", icon: 'fa fa-undo',
executeMethod: function () {
angular.copy(blade.origEntity, blade.currentEntity);
{
name: "platform.commands.reset", icon: 'fa fa-undo',
executeMethod: function () {
angular.copy(blade.origEntity, blade.currentEntity);
},
canExecuteMethod: isDirty,
permission: blade.updatePermission
},
canExecuteMethod: isDirty,
permission: blade.updatePermission
},
{
name: "platform.commands.delete", icon: 'fa fa-trash-o',
executeMethod: function () {
var dialog = {
id: "confirmDeleteItem",
title: "orders.dialogs.operation-delete.title",
message: "orders.dialogs.operation-delete.message",
callback: function (remove) {
if (remove) {
if (blade.id === 'operationDetail') {
//var idx = _.findIndex(blade.customerOrder.childrenOperations, function (x) { return x.id === blade.origEntity.id; });
//blade.customerOrder.childrenOperations.splice(idx, 1);
//var idx = _.findIndex(blade.realOperationsCollection, function (x) { return x.id === blade.origEntity.id; });
//blade.realOperationsCollection.splice(idx, 1);

//bladeNavigationService.closeBlade(blade);
}
else {
subscriptionAPI.delete({ ids: blade.origEntity.id }, function () {
blade.parentBlade.refresh();
bladeNavigationService.closeBlade(blade);
});
{
name: "platform.commands.delete", icon: 'fa fa-trash-o',
executeMethod: function () {
var dialog = {
id: "confirmDeleteItem",
title: "orders.dialogs.operation-delete.title",
message: "orders.dialogs.operation-delete.message",
callback: function (remove) {
if (remove) {
if (blade.id === 'operationDetail') {
//var idx = _.findIndex(blade.customerOrder.childrenOperations, function (x) { return x.id === blade.origEntity.id; });
//blade.customerOrder.childrenOperations.splice(idx, 1);
//var idx = _.findIndex(blade.realOperationsCollection, function (x) { return x.id === blade.origEntity.id; });
//blade.realOperationsCollection.splice(idx, 1);

//bladeNavigationService.closeBlade(blade);
}
else {
subscriptionAPI.delete({ ids: blade.origEntity.id }, function () {
blade.parentBlade.refresh();
bladeNavigationService.closeBlade(blade);
});
}
}
}
}
};
dialogService.showConfirmationDialog(dialog);
};
dialogService.showConfirmationDialog(dialog);
},
canExecuteMethod: function () {
return true;
},
permission: 'order:delete'
},
canExecuteMethod: function () {
return true;
},
permission: 'order:delete'
},
{
name: "orders.commands.cancel-document", icon: 'fa fa-remove',
executeMethod: function () {
var dialog = {
id: "confirmCancelOperation",
callback: function (reason) {
if (reason) {
blade.currentEntity.cancelReason = reason;
blade.currentEntity.cancelledDate = moment().utc();
blade.currentEntity.isCancelled = true;
blade.setEntityStatus('Canceled');
$scope.saveChanges();
{
name: "orders.commands.cancel-document", icon: 'fa fa-remove',
executeMethod: function () {
var dialog = {
id: "confirmCancelOperation",
callback: function (reason) {
if (reason) {
blade.currentEntity.cancelReason = reason;
blade.currentEntity.cancelledDate = moment().utc();
blade.currentEntity.isCancelled = true;
blade.setEntityStatus('Canceled');
$scope.saveChanges();
}
}
}
};
dialogService.showDialog(dialog, 'Modules/$(VirtoCommerce.Orders)/Scripts/dialogs/cancelOperation-dialog.tpl.html', 'virtoCommerce.orderModule.confirmCancelDialogController');
},
canExecuteMethod: function () {
return blade.currentEntity && !blade.currentEntity.isCancelled;
};
dialogService.showDialog(dialog, 'Modules/$(VirtoCommerce.Orders)/Scripts/dialogs/cancelOperation-dialog.tpl.html', 'virtoCommerce.orderModule.confirmCancelDialogController');
},
canExecuteMethod: function () {
return blade.currentEntity && !blade.currentEntity.isCancelled;
},
permission: blade.updatePermission
},
permission: blade.updatePermission
},
{
name: "subscription.commands.new-order", icon: 'fa fa-file-text',
executeMethod: function () {
dialogService.showConfirmationDialog({
id: "confirmDialog",
title: "subscription.dialogs.new-order.title",
message: "subscription.dialogs.new-order.message",
callback: function (confirmed) {
if (confirmed) {
bladeNavigationService.closeChildrenBlades(blade, function () {
subscriptionAPI.createOrder(blade.currentEntity, function (result) {
blade.refresh();
blade.parentBlade.refresh();
{
name: "subscription.commands.new-order", icon: 'fa fa-file-text',
executeMethod: function () {
dialogService.showConfirmationDialog({
id: "confirmDialog",
title: "subscription.dialogs.new-order.title",
message: "subscription.dialogs.new-order.message",
callback: function (confirmed) {
if (confirmed) {
bladeNavigationService.closeChildrenBlades(blade, function () {
subscriptionAPI.createOrder(blade.currentEntity, function (result) {
blade.refresh();
blade.parentBlade.refresh();
});
});
});
}
}
}
});
},
canExecuteMethod: function () {
return !blade.isLocked && !isDirty();
},
permission: 'order:create'
}
];
});
},
canExecuteMethod: function () {
return !blade.isLocked && !isDirty();
},
permission: 'order:create'
}
];
};

blade.onClose = function (closeCallback) {
bladeNavigationService.showConfirmationIfNeeded(isDirty(), canSave(), blade, $scope.saveChanges, closeCallback, "orders.dialogs.operation-save.title", "orders.dialogs.operation-save.message");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<va-metaform registered-inputs="blade.metaFields" blade="blade" column-count="2" ng-init="setForm(formScope)"></va-metaform>
</fieldset>
</form>
<va-widget-container group="subscriptionDetail" blade="blade" gridster-opts="{columns: 4}" ng-disabled="blade.isLocked"></va-widget-container>
<va-widget-container group="subscriptionDetail" blade="blade" gridster-opts="{columns: 4, sparse: true }" ng-disabled="blade.isLocked"></va-widget-container>
</div>
</div>
</div>
Loading

0 comments on commit 003cf8b

Please sign in to comment.