diff --git a/static/src/css/pos.css b/static/src/css/pos.css index 6a6f9a0..2d5340d 100644 --- a/static/src/css/pos.css +++ b/static/src/css/pos.css @@ -378,7 +378,6 @@ td { display: inline-block; box-sizing: border-box; -moz-box-sizing: border-box; - height: 48px; padding-left: 6px; margin: 2px; background: #8b8b8b; @@ -437,14 +436,17 @@ td { margin-left: -4px; } -.pos .order-button.square{ - margin-left:1px; - background: #5c5c5c; - color: rgb(160,160,160); - font-size: 18px; +.pos .order-button.square { + margin-left: 1px; + /* background: #5c5c5c; */ + /* color: rgb(160, 160, 160); */ + /* font-size: 18px; */ text-align: center; line-height: 36px; width: 45%; + /* margin-top: 10px; */ + /* margin-bottom: 10px; */ + /* padding: 10px; */ } .pos .order-button:not(.square) > .fa { font-size: 16px; @@ -1178,7 +1180,7 @@ td { .screen .screen-content{ /*margin: 0px auto;*/ left: 0px; - max-width: 1024px; + max-width: 1200px; text-align: left; height: 100%; overflow: hidden; @@ -2590,6 +2592,15 @@ td { margin-bottom: 0.3em; } +.pos .machine-access-sidebar .subpoints { + margin-left: 0.5em; + list-style-type: none; /* oder none, wenn du keine Punkte willst */ +} + +.pos .machine-access-sidebar .client-details-vvow_sec_briefing_error{ + color: rgb(255, 0, 0); +} + .pos .clientlist-screen .client-details{ padding: 16px; border-bottom: solid 5px rgb(110,200,155); @@ -2602,7 +2613,7 @@ td { /* .pos .clientlist-screen .client-details-vvow_briefing{ color: rgb(128, 255, 0); } */ -.pos .clientlist-screen .client-details-vvow_briefing_error{ +.pos .client-details-vvow_briefing_error{ color: rgb(255, 0, 0); } .pos .clientlist-screen .client-details-vvow_sec_briefing_error{ diff --git a/static/src/js/machine_access_sidebar.js b/static/src/js/machine_access_sidebar.js index 5ed8374..f94cb2b 100644 --- a/static/src/js/machine_access_sidebar.js +++ b/static/src/js/machine_access_sidebar.js @@ -4,12 +4,22 @@ odoo.define('open_workshop.machine_access_sidebar', function (require) { "use strict"; + const DUMMY_PARTNER = { + id: 1, + name: "AAAA Max Mustermann", + security_briefing: false, + security_id: null, + create_date: null, + }; + var rpc = require('web.rpc'); var screens = require('point_of_sale.screens'); var chrome = require('point_of_sale.chrome'); var core = require('web.core'); var QWeb = core.qweb; + + var MachineAccessSidebar = screens.ScreenWidget.extend({ template: 'MachineAccessSidebar', @@ -32,19 +42,19 @@ odoo.define('open_workshop.machine_access_sidebar', function (require) { render_access: function() { var self = this; - var partner = this.partner; - if (!partner) { - this.$('.access-content').html("

Kein Kunde ausgewählt.

"); - return; - } + var partner = this.partner || DUMMY_PARTNER; + + rpc.query({ model: 'ows.machine', method: 'get_access_list_grouped', args: [partner.id], }).then(function (result) { + partner.create_date = partner.create_date && partner.create_date.substring(0, 10); var html = QWeb.render('PartnerMachineAccessList', { areas: result || [], + partner: partner, }); self.$('.access-content').html(html); }); @@ -113,7 +123,6 @@ odoo.define('open_workshop.models', function (require) { var models = require('point_of_sale.models'); var field_utils = require('web.field_utils'); models.load_fields('res.partner', 'create_date'); - models.load_fields('res.partner', 'birthday'); models.load_fields('res.partner', 'security_briefing'); models.load_fields('res.partner', 'security_id'); diff --git a/static/src/xml/ows_briefing_details.xml b/static/src/xml/ows_briefing_details.xml index 5a6f357..3f056b3 100644 --- a/static/src/xml/ows_briefing_details.xml +++ b/static/src/xml/ows_briefing_details.xml @@ -61,43 +61,12 @@
- Haftungs. - - - Ja - - - - - Nein, bitte überprüfen! - - - Id: - - - - - - - - Kein ID vorhanden - - -
-
- Erstellt am: - - - - - - - N/A - + Haftungsausschluss prüfen!
+ diff --git a/static/src/xml/ows_briefing_details_edit.xml b/static/src/xml/ows_briefing_details_edit.xml index 95822fd..53c79a6 100644 --- a/static/src/xml/ows_briefing_details_edit.xml +++ b/static/src/xml/ows_briefing_details_edit.xml @@ -59,5 +59,6 @@ + diff --git a/static/src/xml/ows_machine_sidebar.xml b/static/src/xml/ows_machine_sidebar.xml index 5c0075b..9f45425 100644 --- a/static/src/xml/ows_machine_sidebar.xml +++ b/static/src/xml/ows_machine_sidebar.xml @@ -6,48 +6,83 @@ + +
+
+
    +
  • Einweisungen
  • +
- -
-
-
    Einweisungen
-
-
    -
    - - Werkstatt -
    -
-
    - - - Haftungsausschluss -
      - Bitte Prüfen -
        - -
          Id: - - N/A
        -
          Erstellt: - - N/A
        -
      -
      -
    - -
    -
      - -
      - - - -
      +
      +
        +
      • + + Werkstatt +
      • + +
      • + + -
      -
      -
      + + + + Haftungsausschluss + + + + +
    • +
        ‼️Bitte Prüfen‼️
      +
    • +
      + + + +
        +
      • + Id: + + + + + N/A + +
      • +
      • + Erstellt: + + + + + N/A + +
      • +
      +
      + +
    +
- + + +
+
    + +
  • + + + + + + + +
  • +
    +
+
+
+
+ +