Skip to content

Commit

Permalink
fix: statistics (#13)
Browse files Browse the repository at this point in the history
fix statistics bug, manager is only able to fetch users from same org div

change icons

close #12

Co-authored-by: Cristian Ayala <[email protected]>
  • Loading branch information
Cristian-Ayala and Cristian Ayala authored Feb 25, 2023
1 parent 04ac721 commit 7318ffd
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 36 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,4 +490,13 @@ module.exports = {
// https://eslint.org/docs/rules/template-curly-spacing
"vue/template-curly-spacing": "error",
},
overrides: [
{
files: ["*.html"],
rules: {
"vue/comment-directive": "off",
"max-len": "off",
}
}
]
};
13 changes: 6 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="src/assets/img/icons/icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8">
<link rel="icon" href="src/assets/img/icons/icon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Acosta Repuestos</title>
<link rel="stylesheet" href="src/assets/css/bootstrap.min.css">
<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" as="style" onload="this.onload=null;this.rel='stylesheet'"/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,800&display=swap">
<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,800&amp;display=swap">
<link rel="stylesheet" href="src/assets/css/style.default.min.css" id="theme-stylesheet">
<link rel="stylesheet" href="src/assets/css/custom.min.css">
<meta name="description" content="Manage inventory and catalogs">
<link rel="apple-touch-icon" href="src/assets/img/icons/192x192.png" sizes="180x180">
<link rel="mask-icon" href="src/assets/img/icons/192x192.png" color="#FFFFFF">
<meta name="theme-color" content="#e94c63">
<link rel="stylesheet" href="src/assets/css/element_plus_overwrite.css">
Expand All @@ -29,4 +28,4 @@
window.process.nextTick = setTimeout;
</script>
</body>
</html>
</html>
Binary file removed public/favicon.ico
Binary file not shown.
Binary file modified public/img/192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/img/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/maskable_icon_x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/maskable_icon_x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions public/robots.txt

This file was deleted.

Binary file removed src/assets/img/icons/16x16.png
Binary file not shown.
Binary file removed src/assets/img/icons/192x192.png
Binary file not shown.
Binary file removed src/assets/img/icons/32x32.png
Binary file not shown.
Binary file removed src/assets/img/icons/512x512.png
Binary file not shown.
Binary file modified src/assets/img/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/assets/img/icons/motor-sport.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Left-SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
@click="logout()"
>
<i class="fas fa-door-open mr-3 text-black my-2" aria-hidden="true"></i>
<span v-if="actualUser">Salir {{ userName }}</span>
<span v-if="actualUser">Salir <br>{{ userName }}</span>
</a>
</div>
</template>
Expand Down
21 changes: 1 addition & 20 deletions src/store/modules/categorias.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,28 +155,9 @@ export default (app) => ({
live: true,
retry: true,
})
.on("change", (change) => {
console.log("yo, something changed!", change);
.on("change", () => {
dispatch("getAllCategorias");
})
.on("paused", (info) => {
console.log(
"replication was paused, usually because of a lost connection",
info,
);
})
.on("active", (info) => {
console.log("replication was resumed", info);
})
.on("denied", (err) => {
console.log(
"a document failed to replicate (e.g. due to permissions)",
err,
);
})
.on("complete", (info) => {
console.log("Completado", info);
})
.on("error", (err) => {
console.log("totally unhandled error (shouldn't happen)", err);
});
Expand Down
4 changes: 3 additions & 1 deletion src/store/modules/estadisticas.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export default (app) => ({
method: "GET",
credentials: "include",
};
if (searchParameters.userSelected === "Todos" && localStorage.getItem("role") !== "manager") return dispatch("getStatisticsByOrgDiv", { searchParameters, settings });
const role = localStorage.getItem("role");
if (searchParameters.userSelected === "Todos" && role === "manager") return dispatch("getStatisticsByOrgDiv", { searchParameters, settings });
if (searchParameters.typeOfFilter === "Por cede") return dispatch("getStatisticsByOrgDiv", { searchParameters, settings });
return dispatch("getStatisticsByUser", { searchParameters, settings });
},
getStatisticsByUser(store, {searchParameters, settings}) {
Expand Down
8 changes: 4 additions & 4 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default defineConfig({
globPatterns: ["**/*.{js,css,html,ico,png,svg}"],
},
manifest: {
id: "1.0.0",
id: "2.0.0",
version: "1.0.0",
manifest_version: 1,
name: "Acosta Repuestos",
Expand All @@ -39,7 +39,7 @@ export default defineConfig({
description: "Manage inventory and catalogs",
theme_color: "#e94c63",
start_url: "/",
display: "fullscreen",
display: "standalone",
background_color: "#e94c63",
icons: [
{
Expand All @@ -49,7 +49,7 @@ export default defineConfig({
purpose: "any",
},
{
src: "img/192x192.png",
src: "img/maskable_icon_x192.png",
sizes: "192x192",
type: "image/png",
purpose: "maskable",
Expand All @@ -61,7 +61,7 @@ export default defineConfig({
purpose: "any",
},
{
src: "img/512x512.png",
src: "img/maskable_icon_x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
Expand Down

0 comments on commit 7318ffd

Please sign in to comment.