<template>
  <!-- <v-flex xs12>
  <v-container grid-list-xl>-->
  <v-layout row wrap align-top v-if="this.formState.ready">
    <v-flex xs12 mt-1 mb-2 v-if="formState.errorBoxMessage">
      <v-alert
        ref="errorbox"
        v-show="formState.errorBoxMessage"
        color="error"
        icon="fa-exclamation-circle "
        value="true"
        transition="scale-transition"
        class="multi-line"
        outline
        >{{ formState.errorBoxMessage }}</v-alert
      >
    </v-flex>
    <WidgetList />
    <WarehouseTop />
    <POTop />
    <PartTop />
    <PartAssemblyTop />
    <v-flex xs12 md4>
      <v-card class="elevation-0 transparent">
        <v-card-text class="text-xs-center">
          <v-icon x-large color="accent">fa-lightbulb</v-icon>
        </v-card-text>
        <v-card-title primary-title class="layout justify-center">
          <div class="headline text-xs-center">Material Design</div>
        </v-card-title>
        <v-card-text>
          Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat
          tincidunt ornare. Pellentesque habitant morbi tristique senectus et
          netus et malesuada fames ac turpis egestas. Nullam in aliquet odio.
          Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti.
        </v-card-text>
      </v-card>
    </v-flex>
  </v-layout>
  <!-- </v-container>
  </v-flex>-->
</template>

<script>
/*  Xeslint-disable */
import WidgetList from "../components/inventorywidgetlist";
import WarehouseTop from "../components/inventorywarehousetop";
import POTop from "../components/inventorypotop";
import PartTop from "../components/inventoryparttop";
import PartAssemblyTop from "../components/inventorypartassemblytop";

export default {
  beforeCreate() {
    this.$gzlocale
      .fetch(["Inventory"])
      .then(() => (this.formState.ready = true))
      .catch(err => {
        this.formState.ready = true;
        this.$gzHandleFormError(err);
      });
  },
  created() {
    this.$gzevent.$emit("menu-change", {
      isMain: true,
      icon: "fa-dolly",
      title: this.$gzlocale.get("Inventory")
    });
  },
  components: {
    WidgetList,
    WarehouseTop,
    POTop,
    PartTop,
    PartAssemblyTop
  },
  data() {
    return {
      formState: {
        ready: false,
        loading: true,
        errorBoxMessage: null,
        appError: null,
        serverError: {}
      }
    };
  }
};
</script>
