Sportbekleidung für Hallensport, Training, Workout und Fitness im Kempa Shop online kaufen

Für alle Teamplayer, Hallensportbegeisterten,Vollblut-Sportler, Freizeit-Athleten, Fitness-Queens und Workout-Fans. Für euch Helden eures Vereins und euch Einzelkämpfer im Gym. Für alle, die Sport, Bewegung und einen aktiven Lifestyle lieben. Für euch gibt es hier im Kempa-Shop hochwertige Sportbekleidung, authentische Sportmode, vielseitige Trainings- und Wettkampftrikots und lässig-sportive Freizeitstyles.

Alle Themen auf einen Blick:

Hier findest du Sportbekleidung für Damen, Herren und Kinder

Du willst performen – wir liefern dir das Equipment dazu. Vom Einsteiger bis zum Top-Athleten haben wir für jeden das richtige Sport-Outfit und die perfekten Hallenschuhe. Damit dein Training, dein Wettkampf und dein Match so laufen, wie du es dir vorstellst, setzen wir alles daran, dir atmungsaktive Sportshirts, Sporthosen in kurz und lang, klassische Trikot-Sets, Jacken, Trainingsanzüge und Indoor-Schuhe in hochwertiger Qualität bieten zu können.

Nicht nur funktional sondern auch stylish ist unsere Sportbekleidung für Damen. Stelle dir einfach aus lässigen Sport-Tops und bequemen Damen-Sporthosen dein neues Lieblings-Sportoutfit zusammen. Oder suchst du einen Trainingsanzug für DamenTrack Pants und Trainingsjacken sind bei Kempa ebenso modisch wie effizient. Voll im Trend liegst du bei deinem Workout oder im Fitness mit einem Skort. Klassisch wird es mit Sport-Leggings oder Tights für Damen, die wie eine zweite Haut sitzen ohne dich einzuengen – so hast du immer deine volle Bewegungsfreiheit. Wenn es von der Sporthalle auch mal nach draußen gehen soll, sind Regenjacken für Damen ein super Begleiter für alle Witterungen. Und deinen coolen Street Style oder Casual Wear für deinen Freizeit-Look findest du bei den Hoodies für Damen und den sportiven Damen-Shirts. Aber selbstverständlich spricht nichts dagegen, wenn du auch dein Sport-Top und deine bequeme Workout-Hose in deinem aktiven Alltag trägst.

Atmungsaktive Sportbekleidung für Herren für dein Workout und deinen Teamsport hat hier noch viel mehr zu bieten: Ergonomische Schnittführung und technische Details wie Mesh-Einsätze für optimales Trageklima sorgen dafür, dass es bei dir läuft. Auch für dich und deinen Lieblingssport gibt es hier die richtige Sporthose für Herren und das richtige Herren-Sportshirt. Für deine Trainingsbekleidung findest du hier eine große Auswahl an Trainingsanzügen, Trainingshosen und Sportoberteilen in Kurzarm und Langarm für Herren. Wenn du nach dem Sport in bequeme und funktionale Freizeitkleidung wechseln möchtest, schau dich doch bei unseren sportlichen Hoodies für Herren und Sweatpants um. Sportive Polo-Shirts und T-Shirts sind die klassische Streetwear, die du lässig kombinieren kannst.

Für Kids ist Sport und Bewegung besonders wichtig. Für Schulsport und Freizeitsport gibt es hier Sportbekleidung für Kinder . Ob Funktionsshirt und kurze Hose für die Sportsachen oder Trainingsanzug und Sportoberteil für Kinder: Sportkleidung für Jungen und Mädchen ist hier durchdacht, robust und zweckmäßig. In Shorts, Sport-Tops und Shirts können sich aktive Kids auspowern, spielen und toben. Dabei ist moderne Sportkleidung für Kinder besonders pflegeleicht, Gras- und Matschflecken verschwinden in der Waschmaschine ganz easy. Und auch für ihren Freizeitlook werden coole Kids hier fündig. Sportpullover und bequeme Hoodies für Jungs und Mädchen, kurze Hosen oder Jogger sind genau das Richtige für aktive Kinder.

Acessoires wie Socken und atmungsaktive Unterwäsche für Sportler komplettieren dein Outfit für Teamsport, Fitness und Workout. Die passende Sportunterwäsche oder Baselayer trägt sich angenehm und optimiert das Trageklima. Atmungsaktive Sport-Tights, die dein Körperklima regulieren, Shirts zum Drunterziehen in mit langen Ärmeln oder auch in Kurzarm und Damen-Sport-Bustiers, die bequem und komfortabel sitzen, ohne einzuengen und dabei unterstützen, sind die perfekte Wäsche für kühlere Temperaturen. Sportsocken gibt es von kurzen Sneakersocken bis zu langen Socken. Durch die smarte Wirktechnik rutschen sie nicht und die Laufsohle ist angenehm weich.

Teamsportler und Sportteams, Training und Spiel – hier gibt es Sportbekleidung für alles und jeden!

Kempa ist Teamsport! Ob vor dem Spiel, im Spiel und nach dem Spiel, wir haben die Teamwear für dich und deinen Verein. Bei uns kaufst du gleich als Satz die Präsentationsanzüge und Trainingsanzüge für dein Team. Trikot-Sets in vielen verschiedenen Varianten und in einer großen Farbauswahl kannst du dir hier zusammenstellen. Jerseys in Kurzarm und Langarm, verschiedene Sporthosen in kurz und lang, Unterziehhosen und Longsleeves – mit Trikots im Mix & Match kommt ihr zu eurer ganz individuellen Teamausstattung, ganz wie ihr sie braucht. Auch Damen-Teams finden hier selbstverständlich ihren Ausstatter für Trikotsätze – und garantiert mehr Farben zur Auswahl als nur Rosa. Egal ob Schwarz, Rot, Grün, Blau oder Gelb: Wir haben Teambekleidung in deinen Vereinsfarben. Alle Kollektionen haben lange Laufzeiten, sodass du auch in der nächsten Saison noch fehlende Teile nachkaufen kannst. Zusätzlich kannst du dir im Kempa-Shop alle Trikotsätze und die gesamte Vereinsbekleidung veredeln lassen: Mit einer hochwertigen und haltbaren Beflockung drucken wir Vereinsnamen, Logo, Spielernamen und -Nummer ganz individuell und günstig auf. Auch für Trainer, Betreuer und Supporter gibt es hier individualisierte Kleidung von deinem Verein. Im Kempa Shop geht das ganz unkompliziert: Teamwear kaufen und die Sportkleidung bedrucken lassen kannst du hier beides gleichzeitig.

Aber genauso haben wir dich als Einzelsportler im Blick, wenn wir unsere Kollektionen entwerfen. Für dein Solo-Training gibt es hier im Kempa Shop modische und funktionale Sportswear, mit der du indoor und outdoor eine gute Performance abliefern kannst. Lässige Jogginghosen für viel Bewegungsfreiheit oder gleich ein kompletter Sportanzug? Atmungsaktive T-Shirts? Haben wir alles für dich. Übrigens: Auch einzelne Kleidungsstücke kannst du bei uns individualisieren. Lass dir doch deine ganz persönliche Sportkleidung bedrucken, mit deinem Namen oder deinem Lieblingsmotiv.

Kempa Sportbekleidung für Handball, Volleyball, Fitness und viele weitere Sportarten

Als absoluter Teamsportprofi hat Kempa die perfekte Teamausstattung für deinen Indoor-Sport. Handballtrikots als kompletter Satz oder einzeln, Handballschuhe und Handbälle findest du hier vom Handball-Ausstatter Kempa. Teamwear in Schnitten für Frauen und Männer und in Kindergrößen lässt sich hier individuell zusammenstellen und kombinieren.

Unser großes Sortiment eignet sich auch optimal für alle anderen Hallensportarten. Dein Volleyball-Team wird hier sicher ebenso fündig, wenn Jerseys und Shorts für Volleyballspielerinnen und Volleyballspieler gesucht werden. Pritschen und Baggern läuft perfekt in der modischen und funktionalen Volleballbekleidung von Kempa.

Überall, wo atmungsaktive, ergnonomisch geschnittene Sportbekleidung gebraucht wird, gibt es das richtige Sportoutfit von Kempa. Auch für Fitness und Workout haben wir die richtige Funktionskleidung für dich, in angesagten Farben und coolem Style. Sport Tights und atmungsaktive T-Shirts, Track Pants und Shorts – was auch immer du für deine Sport-Session benötigst, findest du hier, bis zu den Indoor-Schuhen die zu deinem ganz persönlichen Trainings-Stil passen.

Für dein Konditionstraining findest du Jogginganzüge, Trainingshosen und Trainingsjacken zum Laufen. Mit unseren Regenjacken bringst du deine Runde auch bei nasser Witterung zuende. Ob du Laufhosen und Tights bevorzugst oder lieber in kurzen Hosen joggen gehst, bei unserer hochwertigen Sportbekleidung ist ganz bestimmt auch etwas für dich dabei.

Was ist dein Sport? Ringen? Fechten? Tischtennis? Hockey? Schau dich bei uns um. Wir haben auch für deine Sportart hochwertiges Sportequipment und die richtige Sportbekleidung für dich im Kempa Online-Shop!

Hallenschuhe für Indoor-Sport, Workout und Fitness

Was auch immer deine Spielposition und dein Spielstil ist, was auch immer du dir als Trainingsziel gesetzt hast. Der richtige Sportschuh für alle Indoor-Activities wartet hier auf dich. Wenn Tempo und Agilität dein Ding sind, dann ist unser superleichter Kempa Wing der richtige Schuh für dich. Dank High Tech Material und smarter Konstruktion geht das Gewicht runter und die Performance bleibt optimal. Bist du die Power-Maschine und möchtest einen stabilen Hallensportschuh, dann wählst du Kempa Attack. Der gibt dir Halt und Kontrolle, ohne Sprungkraft und Mobilität einzuschränken. Für extremen Grip fertigen wir unsere leistungsstarken Sohlen in Kooperation mit dem Gummi-Compound-Profi Michelin.

Hier gibt es dein Sport-Equipment rund um den Teamsport

Alles, was du rund um den Teamsport brauchst, kannst du hier bequem online kaufen. Wir haben Equipment für Schiedsrichter: Vom Schiedsrichter-Trikot bis zur Schiedsrichterpfeife. Markierungsleibchen und Trikot-Taschen, Schoner für Arm, Ellenbogen und Knie, Rucksäcke und Duffle Bags kannst du dir im Kempa Online Shop bestellen. Unser großes Sortiment an Handbällen in vielen Ausführungen und Größen lässt keine Wünsche offen. Ob kleine und leichte Handbälle für Kinder oder der Spielball für das nächste Handball-Match, hier hast du die Auswahl.

Alles für Indoor-Sport beim Teamsport-Profi Kempa online kaufen

Für Teams und Vereine, für Kinder und Erwachsene, Für Training und Spiel oder dein Workout. Hier im Kempa-Shop findest du dein Sport-Outfit, Sportbekleidung, Hallenschuhe und Sport-Mode für deinen sportiven Casual Style.

ViisonCommonApp.addSnippetNamespaces({"backend\/viison_common_compatibility_check\/main":{"check\/notification\/additionalinformation":"Mehr Informationen","check\/notification\/message":"Das Plugin [0] erfordert Version >= [1] des Plugins [2]. Bitte aktualisieren Sie das Plugin.","check\/notification\/title":"Plugin Kompatibilit\u00e4t"}}); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonCompatibilityCheck.view.Menu', { override: 'Shopware.apps.Index.view.Menu', /* @Override */ initComponent: function () { // Trigger the compatibility check 500 ms after the menu was created this.on('menu-created', function () { window.setTimeout(this.viisonCommonPerformCompatibilityCheck.bind(this), 500); }, this); return this.callParent(arguments); }, /** * Checks for any plugin compatibility issues and displays them * as growl messages. */ viisonCommonPerformCompatibilityCheck: function () { Ext.Ajax.request({ url: ViisonCommonApp.assembleBackendUrl('ViisonCommonCompatibilityCheck/getCompatibilityIssues'), scope: this, success: function (response) { var responseData = Ext.JSON.decode(response.responseText, true); if (!responseData.success) { return; } // Display compatibility issues as growl message. // Each issue is displayed in its own growl message var compatibilityIssues = responseData.data; if (compatibilityIssues !== null) { Ext.Array.forEach(compatibilityIssues, function (growl) { Shopware.Notification.createStickyGrowlMessage({ title: ViisonCommonApp.getSnippet('check/notification/title', 'backend/viison_common_compatibility_check/main'), text: growl.message, // Add additional button if link and title are given btnDetail: (growl.detailButton) ? { text: growl.detailButton.title, callback: function () { // Open the link window.open(growl.detailButton.link, '_blank'); }, } : '', }); }, this); } }, }); }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonCompatibilityCheck', { /** * Extends from the general sub-application controller, which handles * the sub-application behavior and the event bus. */ extend: 'Enlight.app.SubApplication', /** * The name of the module. */ name: 'Shopware.apps.ViisonCommonCompatibilityCheck', }); ViisonCommonApp.addSnippetNamespaces({"backend\/viison_common_migration\/main":{"dialog\/error\/body":"Folgender unerwarteter Fehler ist aufgetreten:","dialog\/error\/title":"Ein unerwarteter Fehler ist aufgetreten","errorWindow\/button\/disablePlugins\/confirmation\/text":"Wollen Sie wirklich die Migrationen \u00fcberspringen und damit die betroffenen Plugins deaktivieren?","errorWindow\/button\/disablePlugins\/confirmation\/title":"Plugins wirklich deaktivieren?","errorWindow\/button\/disablePlugins\/text":"Abbrechen und Plugins deaktivieren","errorWindow\/button\/reloadBackend\/text":"Backend neuladen","errorWindow\/button\/retry\/text":"Erneut versuchen","errorWindow\/description\/header":"Migrationsfehler aufgetreten!","errorWindow\/description\/paragraph":"F\u00fcr mindestens ein Plugin sind Migrationen fehlgeschlagen:","errorWindow\/migrationSetList\/actionColumn\/copyDetails\/growlMessage\/error\/text":"Kopieren der Fehlerdetails in diesem Browser nicht m\u00f6glich. Bitte klicken Sie auf die Lupe und kopieren Sie die Details manuell in die Zwischenablage.","errorWindow\/migrationSetList\/actionColumn\/copyDetails\/growlMessage\/error\/title":"Fehler","errorWindow\/migrationSetList\/actionColumn\/copyDetails\/growlMessage\/success\/text":"Fehlerdetails wurden in die Zwischenablage kopiert.","errorWindow\/migrationSetList\/actionColumn\/copyDetails\/growlMessage\/success\/title":"Details in Zwischenablage kopiert","errorWindow\/migrationSetList\/actionColumn\/copyDetails\/toolTip":"Fehlerdetails in die Zwischenablage kopieren","errorWindow\/migrationSetList\/actionColumn\/showDetails\/dialog\/title":"Fehlerdetails","errorWindow\/migrationSetList\/actionColumn\/showDetails\/toolTip":"Fehlerdetails anzeigen","errorWindow\/migrationSetList\/column\/errorMessage\/text":"Fehlermeldung","errorWindow\/migrationSetList\/column\/errorMessage\/value\/noError":"Kein Fehler aufgetreten<\/i>","errorWindow\/migrationSetList\/column\/pluginName\/text":"Plugin","errorWindow\/migrationSetList\/column\/remaining\/text":"Ausstehend","errorWindow\/migrationSetList\/column\/remaining\/toolTip":"Anzahl noch ausstehender Migrationen","errorWindow\/migrationSetList\/column\/successful\/text":"Erfolgreich","errorWindow\/migrationSetList\/column\/successful\/toolTip":"Anzahl erfolgreicher Migrationen","errorWindow\/migrationSetList\/header":"Hinweise zu den durchgef\u00fchrten Migrationen","errorWindow\/title":"Shopware-Update erkannt","growlMessage\/successfulMigration\/text":"Dadurch ergeben sich \u00c4nderungen an ihren Plugins","growlMessage\/successfulMigration\/title":"Shopware Update erkannt","loadMask\/disablingPlugins":"Deaktiviere betroffene Plugins ...","loadMask\/reloadingBackend":"Lade Backend neu ...","migrationLog\/clearedCaches":"Geleerte Caches:","migrationLog\/disabledPlugins":"Meldungen von deaktivierten Plugins:","successWindow\/button\/close\/text":"Schlie\u00dfen","successWindow\/description\/header":"Migrationen wurden erfolgreich durchgef\u00fchrt!","successWindow\/description\/paragraph":"Bitte beachten Sie dazu folgende Hinweise:","successWindow\/title":"Shopware-Update erkannt"}}); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.component.MigrationLog', { extend: 'Ext.form.field.TextArea', mixins: [ 'Shopware.apps.ViisonCommonApp.Mixin', ], viisonSnippetNamespace: 'backend/viison_common_migration/main', readOnly: true, cls: 'is--viison-common--textarea viison_common_migration-component-migration_log', style: { fontFamily: 'Arial, Verdana, sans-serif', }, migrationExecutionResult: null, initComponent: function () { this.callParent(arguments); this.setValueFromMigrationExecutionResult(this.migrationExecutionResult); }, /** * Fills the content with the log for a MigrationExecutionResult * * @param {Shopware.apps.ViisonCommonMigration.model.MigrationExecutionResult} migrationExecutionResult */ setValueFromMigrationExecutionResult: function (migrationExecutionResult) { if (!migrationExecutionResult) { this.setValue(''); } var log = ''; log += migrationExecutionResult.getMessages().join('\n\n'); log += '\n\n' + this.getViisonSnippet('migrationLog/clearedCaches') + '\n'; log += migrationExecutionResult.getInvalidatedCaches().join(', '); this.setValue(log); }, /** * Extends the content with the log for a pluginDisablingResult * * @param {object} pluginDisablingResultData */ appendPluginDisablingResultData: function (pluginDisablingResultData) { var log = this.getValue(); log += '\n\n' + this.getViisonSnippet('migrationLog/disabledPlugins') + '\n'; log += pluginDisablingResultData.messages.join('\n'); log += '\n\n' + this.getViisonSnippet('migrationLog/clearedCaches') + '\n'; log += pluginDisablingResultData.invalidatedCaches.join(', '); this.setValue(log); }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.controller.Main', { extend: 'Ext.app.Controller', mixins: [ 'Shopware.apps.ViisonCommonApp.Mixin', ], viisonSnippetNamespace: 'backend/viison_common_migration/main', /** * @Override */ init: function () { this.callParent(arguments); this.control({ 'viison_common_migration-error_window': { clickDisablePluginsButton: this.onClickDisablePluginsButton, clickReloadBackendButton: this.onClickReloadBackendButton, retry: this.onRetry, }, }); this.executeMigrations(); }, /** * Sends a request to the server to execute all executable migrations */ executeMigrations: function () { var fiveMinutesInMilliseconds = 5 * 60 * 1000; var tenSecondsInMilliseconds = 10 * 1000; // The max execution time of the migration framework is 5 minutes. Therefore allow 5 minutes plus 10 seconds // (to handle the request/response boilerplate) for the request. var timeoutInMilliseconds = fiveMinutesInMilliseconds + tenSecondsInMilliseconds; Ext.Ajax.request({ url: ViisonCommonApp.assembleBackendUrl('ViisonCommonMigration/executeMigrations'), scope: this, timeout: timeoutInMilliseconds, success: function (response) { var responseData = Ext.JSON.decode(response.responseText, true); if (!responseData || !responseData.success) { this.showErrorDialogForFailedRequest(response); } var migrationExecutionResultStore = Ext.create('Shopware.apps.ViisonCommonMigration.store.MigrationExecutionResult'); migrationExecutionResultStore.loadData([responseData.data]); var migrationExecutionResult = migrationExecutionResultStore.first(); this.clearCaches(migrationExecutionResult.getInvalidatedCaches()); if (migrationExecutionResult.hasExecutableMigrations()) { // If the migration store has executable migrations AFTER the execution, it means there went s.th. // wrong this.showErrorWindow(migrationExecutionResult); return; } if (migrationExecutionResult.getMessages().length === 0) { // The sub app should be absolutely quiet if no migrations has a message to be shown to the user return; } Shopware.Notification.createStickyGrowlMessage({ title: this.getViisonSnippet('growlMessage/successfulMigration/title'), text: this.getViisonSnippet('growlMessage/successfulMigration/text'), btnDetail: { callback: function () { this.showSuccessWindow(migrationExecutionResult); }, scope: this, }, }); }, failure: function (response) { this.showErrorDialogForFailedRequest(response); }, }); }, /** * Sends a requests to the server to clear Shopware caches. * * @param {string[]} caches The names of the caches to clear */ clearCaches: function (caches) { if (caches.length === 0) { return; } var requestParams = {}; caches.forEach(function (cache) { requestParams[cache] = 'on'; }); Ext.Ajax.request({ url: ViisonCommonApp.assembleBackendUrl('Cache/clearCache'), method: 'post', params: caches, success: function (response) { var responseData = Ext.JSON.decode(response.responseText); if (!responseData.success) { this.showErrorDialogForFailedRequest(response); } if (caches.indexOf('theme') >= 0 || caches.indexOf('frontend') >= 0) { Shopware.app.Application.fireEvent('shopware-theme-cache-warm-up-request'); } }, failure: function (response) { this.showErrorDialogForFailedRequest(response); }, scope: this, }); }, /** * Shows the error window for a MigrationExecutionResult * * @param {Shopware.apps.ViisonCommonMigration.model.MigrationExecutionResult} migrationExecutionResult */ showErrorWindow: function (migrationExecutionResult) { Ext.create('Shopware.apps.ViisonCommonMigration.view.error.Window', { migrationExecutionResult: migrationExecutionResult, subApp: this.subApplication, }); }, /** * Shows the success window for a MigrationExecutionResult * * @param {Shopware.apps.ViisonCommonMigration.model.MigrationExecutionResult} migrationExecutionResult */ showSuccessWindow: function (migrationExecutionResult) { Ext.create('Shopware.apps.ViisonCommonMigration.view.success.Window', { migrationExecutionResult: migrationExecutionResult, }); }, /** * Handles event when the user clicks the 'disable plugins' button * * @param {Shopware.apps.ViisonCommonMigration.view.error.Window} migrationWindow */ onClickDisablePluginsButton: function (migrationWindow) { this.getViisonSnippet('loadMask/disablingPlugins'); Ext.Ajax.request({ url: ViisonCommonApp.assembleBackendUrl('ViisonCommonMigration/disablePluginsWithExecutableMigrations'), success: function (response) { var responseData = Ext.JSON.decode(response.responseText, true); if (!responseData.success) { this.showError(responseData.message); } this.clearCaches(responseData.data.invalidatedCaches); migrationWindow.migrationLog.appendPluginDisablingResultData(responseData.data); migrationWindow.reloadBackendButton.show(); migrationWindow.disablePluginsButton.hide(); migrationWindow.retryButton.hide(); }, failure: function (response) { this.showError(response.statusText); }, callback: function () { migrationWindow.setLoading(false); }, scope: this, }); }, /** * Handles event when the user clicks the 'reload backend' button * * @param {Shopware.apps.ViisonCommonMigration.view.error.Window} migrationWindow */ onClickReloadBackendButton: function (migrationWindow) { this.reloadBackend(migrationWindow); }, /** * Handles event when the user clicks the 'retry' button * * @param {Shopware.apps.ViisonCommonMigration.view.error.Window} migrationWindow */ onRetry: function (migrationWindow) { // When the backend is reloaded, all failed migrations will be retried this.reloadBackend(migrationWindow); }, /** * Reloads the backend and shows a loading mask about that in the given window. * * @param {Ext.window.Window} window */ reloadBackend: function (window) { window.setLoading(this.getViisonSnippet('loadMask/reloadingBackend')); // eslint-disable-next-line no-restricted-globals location.reload(); }, /** * @param {XMLHttpRequest} XMLHttpRequest */ showErrorDialogForFailedRequest: function (XMLHttpRequest) { var errorMessage = this.getErrorMessageFromXMLHttpRequest(XMLHttpRequest); var dialogMessage = this.getViisonSnippet('dialog/error/body') + '\n\n' + errorMessage; Ext.Msg.show({ title: this.getViisonSnippet('dialog/error/title'), msg: dialogMessage, buttons: Ext.Msg.OK, icon: Ext.Msg.ERROR, }); }, /** * @param {XMLHttpRequest} XMLHttpRequest */ getErrorMessageFromXMLHttpRequest: function (XMLHttpRequest) { var json = Ext.JSON.decode(XMLHttpRequest.responseText, true); if (json) { if (json.success) { return ''; } return json.message; } return XMLHttpRequest.statusText + '\n\n' + XMLHttpRequest.responseText; }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.model.ManifestedMigration', { extend: 'Ext.data.Model', alternateClassName: 'ViisonManifestedMigration', statics: { STATUS_COMPLETED: 'completed', STATUS_FAILED: 'failed', STATUS_PENDING: 'pending', }, fields: [ { name: 'migrationSetId', type: 'int' }, { name: 'name', type: 'string' }, { name: 'status', type: 'string' }, { name: 'canExecute', type: 'boolean' }, { name: 'exceptionMessage', type: 'string', useNull: true }, { name: 'exceptionDetails', type: 'string', useNull: true }, ], }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.model.MigrationExecutionResult', { extend: 'Ext.data.Model', fields: [ { name: 'id', type: 'int' }, { name: 'migrationTranscript', type: 'auto' }, ], associations: [{ type: 'hasMany', model: 'Shopware.apps.ViisonCommonMigration.model.MigrationSet', associationKey: 'migrationSets', name: 'getMigrationSets', foreignKey: 'migrationExecutionResultId', primaryKey: 'id', }], /** * @returns {string[]} */ getInvalidatedCaches: function () { return this.get('migrationTranscript').invalidatedCaches; }, /** * @returns {string[]} */ getMessages: function () { return this.get('migrationTranscript').messages; }, /** * @returns {boolean} */ hasExecutableMigrations: function () { var migrationSets = this.getMigrationSets(); for (var i = 0; i < migrationSets.count(); i += 1) { if (migrationSets.getAt(i).get('hasExecutableMigrations')) { return true; } } return false; }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.model.MigrationSet', { extend: 'Ext.data.Model', fields: [ { name: 'id', type: 'int' }, { name: 'migrationExecutionResultId', type: 'int', useNull: true, default: null }, { name: 'name', type: 'string' }, { name: 'hasExecutableMigrations', type: 'boolean' }, ], associations: [{ type: 'hasMany', model: 'Shopware.apps.ViisonCommonMigration.model.ManifestedMigration', associationKey: 'migrations', name: 'getMigrations', foreignKey: 'migrationSetId', primaryKey: 'id', }], /** * @returns {Shopware.apps.ViisonCommonMigration.model.ManifestedMigration[]} */ getExecutableMigrations: function () { return this.getMigrations().getRange().filter(function (migration) { return migration.get('canExecute'); }); }, /** * @returns {Shopware.apps.ViisonCommonMigration.model.ManifestedMigration} */ getFailedMigration: function () { var failedMigration = null; this.getMigrations().getRange().forEach(function (migration) { if (migration.get('status') === ViisonManifestedMigration.STATUS_FAILED) { failedMigration = migration; return false; } return true; }); return failedMigration; }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.store.MigrationExecutionResult', { extend: 'Ext.data.Store', model: 'Shopware.apps.ViisonCommonMigration.model.MigrationExecutionResult', /** * @override */ loadData: function (MigrationExecutionResultData, append) { if (!append) { this.removeAll(); } MigrationExecutionResultData.forEach(function (migrationExecutionResultData) { var migrationExecutionResult = Ext.create(this.model, migrationExecutionResultData); migrationExecutionResult.getMigrationSetsStore = Ext.create( 'Shopware.apps.ViisonCommonMigration.store.MigrationSet' ); migrationExecutionResult.getMigrationSets().loadData(migrationExecutionResultData.migrationSets); this.add(migrationExecutionResult); }, this); }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.store.MigrationSet', { extend: 'Ext.data.Store', model: 'Shopware.apps.ViisonCommonMigration.model.MigrationSet', sorters: [ { property: 'name' }, ], /** * @override */ loadData: function (migrationSetsData, append) { if (!append) { this.removeAll(); } migrationSetsData.forEach(function (migrationSetData) { var migrationSet = Ext.create(this.model, migrationSetData); migrationSet.getMigrations().loadData(migrationSetData.migrations); this.add(migrationSet); }, this); }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.view.error.List', { extend: 'Ext.grid.Panel', mixins: [ 'Shopware.apps.ViisonCommonApp.Mixin', ], viisonSnippetNamespace: 'backend/viison_common_migration/main', cls: 'viison-common--grid', /** * @override */ initComponent: function () { this.columns = this.createColumns(); this.callParent(arguments); }, /** * @returns {object[]} */ createColumns: function () { return [ { text: this.getViisonSnippet('errorWindow/migrationSetList/column/pluginName/text'), dataIndex: 'name', width: 150, sortable: false, }, { text: this.getViisonSnippet('errorWindow/migrationSetList/column/successful/text'), width: 75, tooltip: this.getViisonSnippet('errorWindow/migrationSetList/column/successful/toolTip'), sortable: false, renderer: function (value, meta, record) { return record.getMigrations().count() - record.getExecutableMigrations().length; }, }, { text: this.getViisonSnippet('errorWindow/migrationSetList/column/remaining/text'), width: 75, tooltip: this.getViisonSnippet('errorWindow/migrationSetList/column/remaining/toolTip'), sortable: false, renderer: function (value, meta, record) { return record.getExecutableMigrations().length; }, }, { text: this.getViisonSnippet('errorWindow/migrationSetList/column/errorMessage/text'), dataIndex: 'exceptionMessage', flex: 1, sortable: false, renderer: function (value, meta, record) { var failedMigration = record.getFailedMigration(); if (failedMigration) { return failedMigration.get('exceptionMessage'); } return this.getViisonSnippet('errorWindow/migrationSetList/column/errorMessage/value/noError'); }, scope: this, }, { xtype: 'actioncolumn', width: 48, items: this.createActionColumnItems(), }, ]; }, /** * @returns {object[]} */ createActionColumnItems: function () { var getClassFunction = function (value, metadata, record) { if (record.getFailedMigration()) { return ''; } return 'x-hidden'; }; return [{ iconCls: 'sprite-magnifier', tooltip: this.getViisonSnippet('errorWindow/migrationSetList/actionColumn/showDetails/toolTip'), getClass: getClassFunction, handler: function (view, rowIndex, colIndex, item, ops, record) { Ext.Msg.alert( this.getViisonSnippet('errorWindow/migrationSetList/actionColumn/showDetails/dialog/title'), record.getFailedMigration().get('exceptionDetails') ); }, scope: this, }, { iconCls: 'sprite-document-copy', tooltip: this.getViisonSnippet('errorWindow/migrationSetList/actionColumn/showDetails/toolTip'), getClass: getClassFunction, handler: function (view, rowIndex, colIndex, item, ops, record) { var textArea = document.createElement('textarea'); textArea.value = record.getFailedMigration().get('exceptionDetails'); document.body.appendChild(textArea); textArea.select(); try { document.execCommand('copy'); Shopware.Msg.createGrowlMessage( this.getViisonSnippet('errorWindow/migrationSetList/actionColumn/copyDetails/growlMessage/success/title'), this.getViisonSnippet('errorWindow/migrationSetList/actionColumn/copyDetails/growlMessage/success/text'), 'Pickware' ); } catch (err) { Shopware.Msg.createGrowlMessage( this.getViisonSnippet('errorWindow/migrationSetList/actionColumn/copyDetails/growlMessage/error/title'), this.getViisonSnippet('errorWindow/migrationSetList/actionColumn/copyDetails/growlMessage/error/text'), 'Pickware' ); } document.body.removeChild(textArea); }, scope: this, }]; }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.view.error.Window', { extend: 'Enlight.app.Window', alias: 'widget.viison_common_migration-error_window', mixins: [ 'Shopware.apps.ViisonCommonApp.Mixin', ], viisonSnippetNamespace: 'backend/viison_common_migration/main', autoShow: true, minimizable: false, layout: { type: 'vbox', align: 'stretch', pack: 'start', }, height: '70%', width: 900, modal: true, migrationExecutionResult: null, /** * @override */ initComponent: function () { this.title = this.getViisonSnippet('errorWindow/title'); this.items = [ this.createHelpContainer(), this.createMigrationsList(), this.createMigrationLogContainer(), ]; this.buttons = this.createButtons(); this.callParent(arguments); }, /** * @returns {(Ext.button.Button)[]} */ createButtons: function () { this.disablePluginsButton = Ext.create('Ext.button.Button', { text: this.getViisonSnippet('errorWindow/button/disablePlugins/text'), cls: 'secondary', handler: function () { Ext.Msg.confirm( this.getViisonSnippet('errorWindow/button/disablePlugins/confirmation/title'), this.getViisonSnippet('errorWindow/button/disablePlugins/confirmation/text'), function (selection) { if (selection === 'yes') { this.fireEvent('clickDisablePluginsButton', this); } }, this ); }, scope: this, }); this.reloadBackendButton = Ext.create('Ext.button.Button', { text: this.getViisonSnippet('errorWindow/button/reloadBackend/text'), cls: 'primary', hidden: true, handler: function () { this.fireEvent('clickReloadBackendButton', this); }, scope: this, }); this.retryButton = Ext.create('Ext.button.Button', { text: this.getViisonSnippet('errorWindow/button/retry/text'), cls: 'primary', handler: function () { this.fireEvent('retry', this); }, scope: this, }); return [ this.disablePluginsButton, this.reloadBackendButton, this.retryButton, ]; }, /** * @returns {object} */ createHelpContainer: function () { return { xtype: 'container', cls: 'viison-common--explanation-area', anchor: '100%', items: [ { xtype: 'container', cls: 'is--header', html: this.getViisonSnippet('errorWindow/description/header'), }, { xtype: 'container', cls: 'is--paragraph', html: this.getViisonSnippet('errorWindow/description/paragraph'), }, ], }; }, /** * @returns {Shopware.apps.ViisonCommonMigration.view.error.List} */ createMigrationsList: function () { this.migrationsList = Ext.create('Shopware.apps.ViisonCommonMigration.view.error.List', { store: this.migrationExecutionResult.getMigrationSets(), height: 100, anchor: '100%', }); return this.migrationsList; }, /** * @returns {object} */ createMigrationLogContainer: function () { return { xtype: 'container', flex: 1, anchor: '100%', layout: 'border', items: [ { xtype: 'container', region: 'north', cls: 'viison-common--explanation-area', items: [ { xtype: 'container', cls: 'is--header is--last', html: this.getViisonSnippet('errorWindow/migrationSetList/header'), }, ], }, this.createMigrationLog(), ], }; }, /** * @returns {Shopware.apps.ViisonCommonMigration.component.MigrationLog} */ createMigrationLog: function () { this.migrationLog = Ext.create('Shopware.apps.ViisonCommonMigration.component.MigrationLog', { region: 'center', migrationExecutionResult: this.migrationExecutionResult, }); return this.migrationLog; }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration.view.success.Window', { extend: 'Enlight.app.Window', mixins: [ 'Shopware.apps.ViisonCommonApp.Mixin', ], viisonSnippetNamespace: 'backend/viison_common_migration/main', autoShow: true, layout: 'border', height: '60%', width: 900, migrationExecutionResult: null, /** * @Override */ initComponent: function () { this.title = this.getViisonSnippet('successWindow/title'); this.items = [ this.createHelpContainer(), this.createMigrationLog(), ]; this.buttons = this.createButtons(); this.callParent(arguments); }, /** * @returns {object} */ createHelpContainer: function () { return { xtype: 'container', cls: 'viison-common--explanation-area', region: 'north', items: [ { xtype: 'container', cls: 'is--header', html: this.getViisonSnippet('successWindow/description/header'), }, { xtype: 'container', cls: 'is--paragraph', html: this.getViisonSnippet('successWindow/description/paragraph'), }, ], }; }, /** * @returns {object[]} */ createButtons: function () { return [{ xtype: 'button', text: this.getViisonSnippet('successWindow/button/close/text'), cls: 'primary', handler: function () { this.close(); }, scope: this, }]; }, /** * @returns {Shopware.apps.ViisonCommonMigration.component.MigrationLog} */ createMigrationLog: function () { this.migrationLog = Ext.create('Shopware.apps.ViisonCommonMigration.component.MigrationLog', { region: 'center', width: '100%', migrationExecutionResult: this.migrationExecutionResult, }); return this.migrationLog; }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCommonMigration', { override: 'Shopware.apps.Index', /** * @Override */ init: function () { this.callParent(arguments); window.setTimeout(function () { this.addController({ name: 'Shopware.apps.ViisonCommonMigration.controller.Main', }); }.bind(this), 1000); }, }); ViisonCommonApp.addSnippetNamespaces({"backend\/viison_pickware_erp_index_news_widget\/main":{"panel\/columns\/date":"Datum","panel\/columns\/title":"Titel","panel\/title":"Pickware News"}}); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonPickwareERPIndexNewsWidget.model.News', { extend: 'Ext.data.Model', fields: [ { name: 'title', type: 'string' }, { name: 'link', type: 'string' }, { name: 'linkHash', type: 'string' }, { name: 'date', type: 'date' }, { name: 'visited', type: 'boolean', convert: function (value, record) { var visited = window.localStorage.getItem('viison_pickware_erp_index_news_widget-news_cache'); if (!visited) { return false; } var visitedLinks = Ext.decode(visited) || {}; return !!visitedLinks[record.get('linkHash')]; }, }, ], }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonPickwareERPIndexNewsWidget.store.News', { extend: 'Ext.data.Store', model: 'Shopware.apps.ViisonPickwareERPIndexNewsWidget.model.News', autoLoad: true, pageSize: 5, remoteSort: false, sorters: [{ property: 'date', direction: 'DESC', }], proxy: { type: 'ajax', url: ViisonCommonApp.assembleBackendUrl('ViisonPickwareERPIndexNewsWidget/getNews'), reader: { type: 'json', root: 'data', totalProperty: 'total', }, }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonPickwareERPIndexNewsWidget.view.Main', { extend: 'Shopware.apps.Index.view.widgets.Base', alias: 'widget.viison-pickware-erp-news-widget', mixins: [ 'Shopware.apps.ViisonCommonApp.Mixin', ], viisonSnippetNamespace: 'backend/viison_pickware_erp_index_news_widget/main', layout: 'fit', bodyPadding: '8 8', /** * @Override */ initComponent: function () { this.title = this.getViisonSnippet('panel/title'); this.newsStore = Ext.create('Shopware.apps.ViisonPickwareERPIndexNewsWidget.store.News'); this.items = [ this.createNewsGrid(), ]; this.tools = [{ type: 'refresh', scope: this, handler: function () { this.newsStore.load(); }, }]; this.callParent(arguments); }, /** * Creates the main Widget grid and its columns * * @return Ext.grid.Panel */ createNewsGrid: function () { return Ext.create('Ext.grid.Panel', { border: 0, store: this.newsStore, columns: [{ dataIndex: 'title', header: this.getViisonSnippet('panel/columns/title'), flex: 1, }, { dataIndex: 'date', header: this.getViisonSnippet('panel/columns/date'), width: 80, align: 'right', renderer: Ext.util.Format.dateRenderer(), }], listeners: { scope: this, itemclick: function (view, record) { // Open clicked news in new tab/window window.open(record.data.link, '_blank'); // Update grid view.getSelectionModel().deselectAll(); this.setVisited(record.data.linkHash); record.set('visited', true); view.refresh(); }, }, viewConfig: { getRowClass: function (record) { // Return css class to modify style (highlight unvisited links) return record.get('visited') ? 'x-widget-viison-pickware-erp-index-news-widget-visited' : 'x-widget-viison-pickware-erp-index-news-widget-unvisited'; }, }, }); }, /** * Remembers visited links in a local storage (saved linkHash) * * @param string linkHash */ setVisited: function (linkHash) { var visited = window.localStorage.getItem('viison_pickware_erp_index_news_widget-news_cache'); var visitedLinks = Ext.decode(visited) || {}; if (visitedLinks[linkHash]) { return; } // Mark link as visited visitedLinks[linkHash] = true; window.localStorage.setItem('viison_pickware_erp_index_news_widget-news_cache', Ext.encode(visitedLinks)); }, }); ViisonCommonApp.addConfig('ViisonPickwareERPPurchasePriceHelper', {"purchasePriceMode":"net"}); ViisonCommonApp.addSnippetNamespaces({"backend\/viison_pickware_erp_purchase_price_helper\/main":{"gross":"brutto","net":"netto","purchase_price":"Einkaufspreis"}}); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. /** * A singleton that holds the plugin's purchase price configuration and allows easy creation * of the correct 'purchase price' ('gross'/'net') labels. */ Ext.define('Shopware.apps.ViisonPickwareERPPurchasePriceHelper.Helper', { singleton: true, alternateClassName: 'ViisonPickwarePurchasePriceHelper', mixins: [ 'Shopware.apps.ViisonCommonApp.Mixin', ], viisonSnippetNamespace: 'backend/viison_pickware_erp_purchase_price_helper/main', viisonConfigNamespace: 'ViisonPickwareERPPurchasePriceHelper', constructor: function () { this.callParent(arguments); this.purchasePriceMode = this.getViisonConfig('purchasePriceMode'); }, /** * @return boolean */ purchasePriceIsNet: function () { return this.purchasePriceMode === 'net'; }, /** * Creates a label of the form 'purchase price (mode)', where 'mode' is either 'net' * or 'gross', depending on the 'purchasePriceMode'. If the optional parameter 'baseLabel' * is given, the it is used instead of 'purchase price', resulting in the format 'baseLabel (mode)'. * * @param string|null baseLabel * @return string */ purchasePriceLabel: function (baseLabel) { var label = baseLabel || this.getViisonSnippet('purchase_price'); var modeLabel = this.purchasePriceIsNet() ? this.getViisonSnippet('net') : this.getViisonSnippet('gross'); return label + ' (' + modeLabel + ')'; }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonPickwareERPPurchasePriceHelper', { extend: 'Enlight.app.SubApplication', name: 'Shopware.apps.ViisonPickwareERPPurchasePriceHelper', }); ViisonCommonApp.addConfig('ViisonPickwareERPPurchasePriceConverter', {"ViisonPickwareERPPurchasePriceConverter":{"purchasePriceModes":{"active":"net","configured":"net"}}}); ViisonCommonApp.addSnippetNamespaces({"backend\/viison_pickware_erp_purchase_price_converter\/main":{"alerts\/close_change_notification\/buttons\/hide_notification":"Hinweis nicht mehr anzeigen","alerts\/close_change_notification\/message":"Da Sie die \"Eingabe von Einkaufspreisen\" von \"[0]\" auf \"[1]\" ge\u00e4ndert haben, sollten Sie in der Regel die Einkaufspreise entsprechend umrechnen. Wenn Sie sich sicher sind, dass eine Umrechnung nicht notwendig ist, k\u00f6nnen Sie den Umrechnungs-Hinweis dauerhaft ausblenden. Der Hinweis wird dann erst wieder angezeigt, wenn Sie die Konfiguration erneut \u00e4ndern.","alerts\/close_change_notification\/title":"Hinweis","alerts\/convert_prices\/message":"M\u00f6chten Sie alle Einkaufspreise jetzt von \"[0]\" zu \"[1]\" umrechnen?","alerts\/convert_prices\/title":"Einkaufspreise umrechnen","convert_prices\/error\/mode_changed":"Die Einkaufspreise wurden nicht umgerechnet, da sich die entsprechende Konfiguration in der Zwischenzeit erneut ge\u00e4ndert hat.","notifications\/convert_prices\/failure\/message":"Die Einkaufspreise konnten nicht umgerechnet werden, da ein unbekannter Fehler aufgetreten ist.","notifications\/convert_prices\/failure\/title":"Fehler","notifications\/convert_prices\/success\/message":"Alle vorhandenen Einkaufspreise wurden erfolgreich umgerechnet.","notifications\/convert_prices\/success\/title":"Einkaufspreise umgerechnet","notifications\/purchase_price_mode_changed\/buttons\/convert":"Preise umrechnen","notifications\/purchase_price_mode_changed\/message":"Sie haben die \"Eingabe von Einkaufspreisen\" von \"[0]\" auf \"[1]\" ge\u00e4ndert. Sie sollten daher jetzt die Einkaufspreise entsprechend umrechnen.","notifications\/purchase_price_mode_changed\/title":"Wichtiger Hinweis"}}); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. /** * A singleton that can observe changes within a ViisonPickwareERP plugin config form and, * in case the 'purchasePriceMode' changes, shows a growl notification, which informs the user * about converting the pruchase prices accordingly. */ Ext.define('Shopware.apps.ViisonPickwareERPPurchasePriceConverter.Converter', { singleton: true, alternateClassName: 'ViisonPickwarePurchasePriceConverter', mixins: [ 'Shopware.apps.ViisonCommonApp.Mixin', ], viisonSnippetNamespace: 'backend/viison_pickware_erp_purchase_price_converter/main', viisonConfigNamespace: 'ViisonPickwareERPPurchasePriceConverter', /** * @var Ext.panel.Panel modeChangeGrowlNotification */ modeChangeGrowlNotification: null, constructor: function () { this.callParent(arguments); var converterConfig = this.getViisonConfig('ViisonPickwareERPPurchasePriceConverter'); this.activePurchasePriceMode = converterConfig.purchasePriceModes.active; this.configuredPurchasePriceMode = converterConfig.purchasePriceModes.configured; }, /** * Adds listeners on the 'load' and 'update' events to the given formStore, which check and compare * the 'purchasePriceMode' configured in the 'ViisonPickwareERP' plugin config form. If the mode * is changed, the listener on the the 'update' event triggers a growl notification informing the * user about the change an the consequences. * * @param Shopware.apps.Base.model.Form|Shopware.apps.Config.store.main.Form formStore */ observeFormStore: function (formStore) { // Add listener on 'load' events, to be able to save the value of the 'purchasePriceMode' // element for later use formStore.on('load', function (store, records) { if (records.length === 0 || records[0].get('name') !== 'ViisonPickwareERP') { return; } // Save the currently configured purchasePriceMode this.configuredPurchasePriceMode = this.getPurchasePriceMode(records[0]); }, this); // Add listener on 'update' events, to be able to detect changes of the 'purchasePriceMode' element formStore.on('update', function (store, record, operation) { if (record.get('name') !== 'ViisonPickwareERP' || operation !== Ext.data.Model.COMMIT) { return; } // Save the new configured purchase price mode and update the growl notifications this.configuredPurchasePriceMode = this.getPurchasePriceMode(record); this.updatePurchasePriceModeChangeNotification(); }, this); }, /** * Loads the currently active and configured purchase price modes and, if the differ, shows a new * purchase price change notification. */ checkPurchasePriceModeConfiguration: function () { Ext.Ajax.request({ method: 'GET', url: ViisonCommonApp.assembleBackendUrl( 'ViisonPickwareERPPurchasePriceConverter/getPurchasePriceModes' ), scope: this, success: function (response) { // Decode the response var responseData = Ext.JSON.decode(response.responseText, true); if (!responseData || !responseData.purchasePriceModes) { return; } // Save the purchase price modes and update the growl notifications this.activePurchasePriceMode = responseData.purchasePriceModes.active || this.activePurchasePriceMode; this.configuredPurchasePriceMode = responseData.purchasePriceModes.configured || this.configuredPurchasePriceMode; this.updatePurchasePriceModeChangeNotification(); }, }); }, /** * Creates and shows a customised, sticky growl notification, which notifies the user about the * change of the purchase price mode and ask them to convert the purchase prices accordingly. */ updatePurchasePriceModeChangeNotification: function () { // Close a currently displayed notification if (this.modeChangeGrowlNotification) { Shopware.Notification.closeGrowlMessage(this.modeChangeGrowlNotification, Shopware.Notification); this.modeChangeGrowlNotification = null; } // Check whether a new notification must be displayed var oldMode = this.activePurchasePriceMode; var newMode = this.configuredPurchasePriceMode; if (oldMode === newMode) { return; } // Show sticky growl notification this.modeChangeGrowlNotification = Shopware.Notification.createStickyGrowlMessage({ title: this.getViisonSnippet('notifications/purchase_price_mode_changed/title'), text: Ext.String.format( this.getViisonSnippet('notifications/purchase_price_mode_changed/message'), this.getViisonSnippet(oldMode, 'backend/viison_pickware_erp_purchase_price_helper/main'), this.getViisonSnippet(newMode, 'backend/viison_pickware_erp_purchase_price_helper/main') ), log: true, btnDetail: { text: this.getViisonSnippet('notifications/purchase_price_mode_changed/buttons/convert'), scope: this, callback: function () { this.onNotificationConvertPricesButton.apply(this, [oldMode, newMode]); }, }, onCloseButton: function () { this.onNotificationCloseButton.apply(this, [oldMode, newMode]); }.bind(this), scope: this, callback: function () { this.modeChangeGrowlNotification = null; }, }, 'ViisonPickwareERP'); }, /** * Shows a confirm alert and, if the user confirms it, sends an AJAX request to convert * all purchase prices from the 'oldMode' to the 'newMode'. * * @param string oldMode * @param string newMode */ onNotificationConvertPricesButton: function (oldMode, newMode) { var alertMessage = Ext.String.format( this.getViisonSnippet('alerts/convert_prices/message'), this.getViisonSnippet(oldMode, 'backend/viison_pickware_erp_purchase_price_helper/main'), this.getViisonSnippet(newMode, 'backend/viison_pickware_erp_purchase_price_helper/main') ); Ext.Msg.confirm( this.getViisonSnippet('alerts/convert_prices/title'), alertMessage, function (buttonId) { if (buttonId === 'yes') { // Confirmed, hence convert the purchase prices Ext.Ajax.request({ method: 'POST', url: ViisonCommonApp.assembleBackendUrl( 'ViisonPickwareERPPurchasePriceConverter/convertPurchasePrices' ), params: { oldMode: oldMode, newMode: newMode, }, scope: this, success: function (response) { // Decode the response var responseData = Ext.JSON.decode(response.responseText, true); var success = responseData && responseData.success; if (responseData && responseData.purchasePriceModes) { // Save the purchase price modes and update the growl notifications this.activePurchasePriceMode = responseData.purchasePriceModes.active || this.activePurchasePriceMode; this.configuredPurchasePriceMode = responseData.purchasePriceModes.configured || this.configuredPurchasePriceMode; this.updatePurchasePriceModeChangeNotification(); } // Show success/failure notification var title; var message; if (success) { title = this.getViisonSnippet('notifications/convert_prices/success/title'); message = this.getViisonSnippet('notifications/convert_prices/success/message'); } else { title = this.getViisonSnippet('notifications/convert_prices/failure/title'); message = (responseData && responseData.message) ? responseData.message : this.getViisonSnippet('notifications/convert_prices/failure/message'); } Shopware.Notification.createGrowlMessage(title, message, 'ViisonPickwareERP', null, true); }, }); } else { // Declined, hence show the notification again this.updatePurchasePriceModeChangeNotification(); } }, this ); }, /** * Shows a confirm alert and, if the user confirms it, sends an AJAX request to hide * the change the notification until the mode changes again. * * @param string oldMode * @param string newMode */ onNotificationCloseButton: function (oldMode, newMode) { Ext.Msg.show({ title: this.getViisonSnippet('alerts/close_change_notification/title'), msg: Ext.String.format( this.getViisonSnippet('alerts/close_change_notification/message'), this.getViisonSnippet(oldMode, 'backend/viison_pickware_erp_purchase_price_helper/main'), this.getViisonSnippet(newMode, 'backend/viison_pickware_erp_purchase_price_helper/main') ), buttons: Ext.Msg.OK, buttonText: { cancel: this.getViisonSnippet('alerts/close_change_notification/buttons/hide_notification'), }, icon: Ext.Msg.WARNING, scope: this, callback: function (buttonId) { if (buttonId !== 'cancel') { return; } // Hide future notifications Ext.Ajax.request({ method: 'POST', url: ViisonCommonApp.assembleBackendUrl( 'ViisonPickwareERPPurchasePriceConverter/hideChangeNotification' ), scope: this, success: function (response) { // Decode the response var responseData = Ext.JSON.decode(response.responseText, true); if (!responseData || !responseData.purchasePriceModes) { return; } // Save the purchase price modes and update the growl notifications this.activePurchasePriceMode = responseData.purchasePriceModes.active || this.activePurchasePriceMode; this.configuredPurchasePriceMode = responseData.purchasePriceModes.configured || this.configuredPurchasePriceMode; this.updatePurchasePriceModeChangeNotification(); }, }); }, }); }, /** * @param Shopware.apps.Config.model.main.Form * @return string|null */ getPurchasePriceMode: function (form) { // Try to find the the 'purchasePriceMode' element var modeIndex = form.getElements().findExact('name', 'purchasePriceMode'); if (modeIndex === -1) { return null; } var element = form.getElements().getAt(modeIndex); // Determine the value return (element.getValues().count() > 0) ? element.getValues().first().get('value') : element.get('value'); }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonPickwareERPPurchasePriceConverter', { extend: 'Enlight.app.SubApplication', name: 'Shopware.apps.ViisonPickwareERPPurchasePriceConverter', }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonPickwareERPIndexPurchasePriceModeCheck.view.Menu', { override: 'Shopware.apps.Index.view.Menu', /** * @Override */ initComponent: function () { // Trigger the purchase price mode check 500 ms after the menu was created this.on('menu-created', function () { window.setTimeout(function () { ViisonPickwarePurchasePriceConverter.checkPurchasePriceModeConfiguration(); }, 500); }, this); this.callParent(arguments); }, }); ViisonCommonApp.addSnippetNamespaces({"backend\/viison_pickware_erp_index_stock_check\/main":{"notification\/message":"Der Bestand von [0] Artikeln ist noch nicht initialisiert.","notification\/open_button":"Jetzt bearbeiten","notification\/title":"Warenbestand initialisieren"}}); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonPickwareERPIndexStockCheck.view.Menu', { override: 'Shopware.apps.Index.view.Menu', /** * @Override */ initComponent: function () { // Trigger the stock range check 500 ms after the menu was created this.on('menu-created', function () { window.setTimeout(function () { this.performStockCheck(); }.bind(this), 500); }, this); this.callParent(arguments); }, /** * Checks all articles for already initialised stocks. */ performStockCheck: function () { Ext.Ajax.request({ url: ViisonCommonApp.assembleBackendUrl('ViisonPickwareERPIndexStockCheck/checkStock'), success: function (response) { // Decode the response var responseData = Ext.JSON.decode(response.responseText, true); if (!responseData || parseInt(responseData.count, 10) === 0) { return; } Shopware.Notification.createStickyGrowlMessage({ title: ViisonCommonApp.getSnippet( 'notification/title', 'backend/viison_pickware_erp_index_stock_check/main' ), text: Ext.String.format( ViisonCommonApp.getSnippet( 'notification/message', 'backend/viison_pickware_erp_index_stock_check/main' ), responseData.count ), btnDetail: { text: ViisonCommonApp.getSnippet( 'notification/open_button', 'backend/viison_pickware_erp_index_stock_check/main' ), callback: function () { // Open the stock setup sub app Shopware.app.Application.addSubApplication({ name: 'Shopware.apps.ViisonPickwareERPStockInitialization', localizedName: ViisonCommonApp.getSnippet( 'notification/title', 'backend/viison_pickware_erp_index_stock_check/main' ), }); }, }, }); }, }); }, }); ViisonCommonApp.addSnippetNamespaces({"backend\/viison_coupon_article_configuration_check\/main":{"message\/button\/openArticle":"Artikel aufrufen","message\/hidePrompt\/question\/tax":"M\u00f6chten Sie die Meldung \u00fcber die fehlerhafte Steuer-Konfigurationen von Geschenkgutschein-Artikeln dauerhaft deaktivieren?","message\/hidePrompt\/title":"Meldung ausblenden","message\/text\/missingVoucher":"Der zugeordnete Geschenkgutschein zu Artikel [0] existiert nicht mehr. Bitte ordnen Sie dem Artikel einen neuen Geschenkgutschein zu, da die automatische Gutscheinerzeugung bei Kauf des Artikels ansonsten fehlschl\u00e4gt.","message\/text\/tax":"Der MwSt.-Satz des Geschenkgutschein-Artikels [0] stimmt nicht mit der Steuer-Konfiguration des zugewiesenen Geschenkgutscheins \u00fcberein.","message\/title":"Fehlerhaft konfigurierter Geschenkgutschein"}}); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonCouponArticleConfigurationCheck.view.Menu', { override: 'Shopware.apps.Index.view.Menu', /** * @Override */ initComponent: function () { // Trigger the article configuration check 500 ms after the menu was created this.on('menu-created', function () { window.setTimeout(function () { this.viisonCouponPerformStockCheck(); }.bind(this), 500); }, this); this.callParent(arguments); }, /** * Checks if there are 'problem articles' and shows a Growl Messages when so. */ viisonCouponPerformStockCheck: function () { Ext.Ajax.request({ url: ViisonCommonApp.assembleBackendUrl('ViisonCoupon/getMisconfiguredArticleDetails'), success: function (response) { // Decode the response var responseData = Ext.JSON.decode(response.responseText, true); if (!responseData || !responseData.success || parseInt(responseData.data.numberOfMisconfiguredArticleDetails, 10) === 0) { return; } responseData.data.misconfiguredArticleDetails.forEach(function (misconfiguredArticleDetail) { var hidedWarnings = localStorage.getItem('viisonCouponHideMisconfiguredArticleDetailMessages') || []; // Hide all warnings that the user as hidden permanently if (hidedWarnings.indexOf(misconfiguredArticleDetail.problemKind) !== -1) { return; } var message = ''; switch (misconfiguredArticleDetail.problemKind) { case 'missingGiftVoucher': message = ViisonCommonApp.getSnippet('message/text/missingVoucher', 'backend/viison_coupon_article_configuration_check/main'); break; case 'taxConfigurationsDiffer': message = ViisonCommonApp.getSnippet('message/text/tax', 'backend/viison_coupon_article_configuration_check/main'); break; default: } Shopware.Notification.createStickyGrowlMessage({ title: ViisonCommonApp.getSnippet('message/title', 'backend/viison_coupon_article_configuration_check/main'), text: Ext.String.format(message, misconfiguredArticleDetail.articleDetail.number), btnDetail: { text: ViisonCommonApp.getSnippet('message/button/openArticle', 'backend/viison_coupon_article_configuration_check/main'), callback: function () { // Open the stock setup sub app Shopware.app.Application.addSubApplication({ name: 'Shopware.apps.Article', params: { articleId: misconfiguredArticleDetail.articleDetail.articleId, }, }); }, }, onCloseButton: function () { // Warnings about missing gift vouchers cannot be hided if (misconfiguredArticleDetail.problemKind === 'missingGiftVoucher') { return; } switch (misconfiguredArticleDetail.problemKind) { case 'taxConfigurationsDiffer': message = ViisonCommonApp.getSnippet('message/hidePrompt/question/tax', 'backend/viison_coupon_article_configuration_check/main'); break; default: message = ''; } Ext.MessageBox.confirm( ViisonCommonApp.getSnippet('message/hidePrompt/title', 'backend/viison_coupon_article_configuration_check/main'), message, function (clickedButton) { if (clickedButton === 'yes') { hidedWarnings.push(misconfiguredArticleDetail.problemKind); localStorage.setItem('viisonCouponHideMisconfiguredArticleDetailMessages', hidedWarnings); } } ); }, }); }); }, }); }, }); // Copyright (c) Pickware GmbH. All rights reserved. // This file is part of software that is released under a proprietary license. // You must not copy, modify, distribute, make publicly available, or execute // its contents or parts thereof without express permission by the copyright // holder, unless otherwise permitted by law. Ext.define('Shopware.apps.ViisonPickwareERPIndexPluginTestCheck.view.Menu', { override: 'Shopware.apps.Index.view.Menu', /** * @Override */ initComponent: function () { // Trigger the test license range check 500 ms after the menu was created this.on('menu-created', function () { window.setTimeout(function () { this.performPluginTestCheck(); }.bind(this), 500); }, this); this.callParent(arguments); }, /** * Checks for a test license and its validity or a test version in combination with a Shopware PR license. */ performPluginTestCheck: function () { Ext.Ajax.request({ url: ViisonCommonApp.assembleBackendUrl('ViisonPickwareERPIndexPluginTestCheck/checkLicense'), success: function (response) { // Decode the response var responseData = Ext.JSON.decode(response.responseText, true); if (!responseData || !responseData.pluginTestStatus || responseData.pluginTestStatus.daysLeft > 14) { return; } // Show growl notification var expiredSnippet = ViisonCommonApp.getSnippet( 'notification/message/test_expired', 'backend/viison_pickware_erp_index_plugin_test_check/main' ); var expiresSoonSnippet = ViisonCommonApp.getSnippet( 'notification/message/test_expires_soon', 'backend/viison_pickware_erp_index_plugin_test_check/main' ); var message = (responseData.pluginTestStatus.daysLeft < 0) ? expiredSnippet : expiresSoonSnippet; Shopware.Notification.createStickyGrowlMessage({ title: ViisonCommonApp.getSnippet( 'notification/title', 'backend/viison_pickware_erp_index_plugin_test_check/main' ), text: Ext.String.format(message, Math.abs(responseData.pluginTestStatus.daysLeft)), btnDetail: { text: ViisonCommonApp.getSnippet( 'notification/buttons/more_info', 'backend/viison_pickware_erp_index_plugin_test_check/main' ), link: 'https://www.pickware.de/starten/mit-pickware-direkt-starten', }, }); }, }); }, });