Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/components/BranchPicker.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<template>
<div class="select-branch">
<div class="outer-20-b">
<a href="#">
Cerrar
<i class="far fa-times-circle"></i>
</a>
</div>
<div class="columns">
<CompanyList class="column companies is-half"/>
<StoreList :class="{'is-hidden': showStoreColumn}" class="column branches is-half"/>
Expand All @@ -16,7 +10,6 @@
import { mapGetters } from "vuex";
import CompanyList from "./CompanyList.vue";
import StoreList from "./StoreList.vue";
import LocationList from "./LocationList.vue";

export default {
name: "BranchPicker",
Expand Down
6 changes: 3 additions & 3 deletions src/components/CompanyList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<div class="icon companies"></div>
<h4>Empresas</h4>
</div>
<ListItem v-for="company in companiesFromServer" :company="company" :key="company.key"/>
<ListCompany v-for="company in companiesFromServer" :company="company" :key="company.emitter.tax_id"/>
</div>
</template>

<script>
import { mapGetters } from "vuex";
import ListItem from "@/components/ListItem.vue";
import ListCompany from "@/components/ListCompany.vue";

export default {
name: "CompanyList",
Expand All @@ -21,7 +21,7 @@ export default {
...mapGetters(["companiesFromServer"])
},
components: {
ListItem
ListCompany
}
};
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="item company">
<button
class="select-item"
:class="{ active: company.active }"
:class="{ 'active': company.active }"
@click="handleCompanySelect(company.company_id)"
v-if="company.status"
>
Expand Down Expand Up @@ -30,13 +30,13 @@
<div class="d-block">RFC: {{ company.emitter.tax_id }}</div>
</span>
</div>
<a class="fas fa-question-circle" @click="handleRequest(company.emitter.tax_id)"></a>
<a class="fas fa-question-circle" @click="(company.emitter.tax_id)"></a>
</button>
<!-- <Request
:class="{'show': showRequest}"
v-if="company.emitter.tax_id === requestId"
:company="company"
/>-->
/> -->
</div>
</template>
<script>
Expand Down
52 changes: 0 additions & 52 deletions src/components/ListLocation.vue

This file was deleted.

14 changes: 5 additions & 9 deletions src/components/ListStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
<div class="info">
<span>
{{company.name}}
<div class="popover_wrapper">
<i class="fas fa-lock-alt"></i>
<div class="push popover_content up">
<p class="popover_message">
No tienes
<strong>permiso</strong> para modificar la información
</p>
</div>
</div>
<div class="popover_wrapper"><a class="fg-question-square"></a>
<div class="push popover_content up">
<p class="popover_message">No tienes <strong>permiso</strong> para acceder a esta ubicación, solicítalo <a class="requestbranch" href="#">aquí</a>.</p>
</div>
</div>
<div class="d-block">RFC: {{ company.branch_id}}</div>
</span>
</div>
Expand Down
25 changes: 0 additions & 25 deletions src/components/LocationList.vue

This file was deleted.

1 change: 0 additions & 1 deletion src/components/__tests__/CompanyList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ describe("CompanyList", () => {
}
}
],
showRequest: () => false,
branchList: () => branches,
showStoreColumn: () => true
};
Expand Down
17 changes: 1 addition & 16 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,9 @@ export const mutations = {
setBranchList: (state, payload) => {
state.branchList = payload;
},
setLocationList: (state, payload) => {
state.locationList = payload;
},
setShowStoreColumn: (state, payload) => {
state.showStoreColumn = payload;
},
setshowLocationColumn: (state, payload) => {
state.showLocationColumn = payload;
},
setRequestId: (state, payload) => {
state.requestId = payload;
},
Expand Down Expand Up @@ -69,16 +63,11 @@ export const actions = {
return {
...store,
...{
status: store.branch_id === payload
active: store.branch_id === payload
}
}
});
commit("setBranchList", stores);
const locations = state.branchList.filter(location => {
return location.branch_id === payload
});
commit('setLocationList', locations);
commit('setshowLocationColumn', !state.showLocationColumn);
},
getCompaniesFromServer: ({
commit
Expand Down Expand Up @@ -107,19 +96,15 @@ export const actions = {
export const state = {
companiesFromServer: [],
branchList: [],
locationList: [],
showStoreColumn: true,
showLocationColumn: true,
showRequest: false,
requestId: "",
};

export const getters = {
companiesFromServer: state => state.companiesFromServer,
branchList: state => state.branchList,
locationList: state => state.locationList,
showStoreColumn: state => state.showStoreColumn,
showLocationColumn: state => state.showLocationColumn,
requestId: state => state.requestId,
showRequest: state => state.showRequest
};
Expand Down