Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Apontamento para api v2 #352

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
042b3e0
add dev login btn
Joabesv Aug 5, 2024
1f89df6
Merge pull request #346 from ufabc-next/feat/local-login
Joabesv Aug 12, 2024
04abe4b
change some routes
Joabesv Aug 25, 2024
a9ad82d
chore: change performance endpoints
Joabesv Aug 26, 2024
c1a28aa
chore: change stats endpoints
Joabesv Aug 26, 2024
11be779
chore: update staging endpoint
Joabesv Aug 27, 2024
10201d8
feat: auloes next p2
mateusbrg Aug 29, 2024
e9f3e63
fix: space between texts
mateusbrg Aug 29, 2024
0dc8444
Merge pull request #347 from ufabc-next/feat/auloes-next-p2
Joabesv Aug 29, 2024
a3461ba
fix: devlogin btn flick
mateusbrg Aug 31, 2024
9677c19
Merge pull request #348 from ufabc-next/fix/local-btn
Joabesv Aug 31, 2024
3edf93e
Merge remote-tracking branch 'origin/develop' into wip/change-routes
Joabesv Sep 9, 2024
26195a8
wip: migrate reactions
Joabesv Sep 9, 2024
b87c426
feat: update endpoints
Joabesv Sep 9, 2024
3d7022d
chore: change staging url
Joabesv Sep 9, 2024
0949d71
Merge pull request #349 from ufabc-next/wip/change-routes
Joabesv Sep 9, 2024
e801b36
fix: env changes
Joabesv Sep 11, 2024
d295844
fix: endpoints
Joabesv Sep 21, 2024
e10945c
update missing urls
Joabesv Nov 15, 2024
d5b7b0f
feat: update to sig mentions
Joabesv Nov 16, 2024
e299a5c
comment
Joabesv Nov 16, 2024
e4b73e6
fix: facbeook endpoint
Joabesv Nov 22, 2024
eba7dea
update sig URL
Joabesv Dec 23, 2024
ec0e07e
fix: v2 urls
Joabesv Dec 23, 2024
b2ce552
feat: support jobs interface backend
Joabesv Dec 25, 2024
b6839cf
remove console.logs
Joabesv Dec 27, 2024
ae0e682
fix type errors
Joabesv Dec 30, 2024
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
9 changes: 8 additions & 1 deletion apps/container/src/layouts/AppBar/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import dayjs from 'dayjs';
import { computed, ref } from 'vue';
import { useAuth } from '@/stores/useAuth';
import { useAliasInitials } from '@/utils/composables/aliasInitials';
import { api } from 'services';

const { logOut, user } = useAuth();
const handleLogout = () => {
Expand Down Expand Up @@ -130,9 +131,10 @@ const internalNavigationItems = [
icon: 'mdi-cog',
route: '/settings',
},

];

const apiURL = api.defaults.baseURL ?? 'https://api.v2.ufabcnext.com'

const externalNavigationItems = [
{
title: 'Snapshot da Matrícula',
Expand All @@ -149,6 +151,11 @@ const externalNavigationItems = [
icon: 'mdi-download',
url: 'https://chrome.google.com/webstore/detail/ufabc-next/gphjopenfpnlnffmhhhhdiecgdcopmhk',
},
...(user.value?.permissions?.includes('admin') ? [{
title: 'Monitoramento de Jobs',
icon: 'mdi-open-in-new',
url: `${apiURL}/login/jobs-monitoring?userId=${user.value?._id}`
}] : [])
];
</script>

Expand Down
40 changes: 11 additions & 29 deletions apps/container/src/views/Performance/PerformanceView.vue
Original file line number Diff line number Diff line change
@@ -1,42 +1,21 @@
<template>
<CenteredLoading
class="mt-10"
v-if="
isPendingCrHistory || isPendingCpHistory || isPendingCrDistributionData
"
/>
<CenteredLoading class="mt-10" v-if="
isPendingCrHistory || isPendingCpHistory || isPendingCrDistributionData
" />
<v-layout class="flex-column align-center justify-center" v-else>
<v-row align="stretch" no-gutters class="w-100">
<v-col
v-for="card in cards"
:key="card.title"
cols="12"
sm="3"
class="mb-2 mb-sm-0"
>
<PerformanceCard
:title="card.title"
:subTitle="card.subtitle"
:description="card.content"
:color="card.color"
:icon="card.icon"
:tooltip="card?.tooltip"
>
<v-col v-for="card in cards" :key="card.title" cols="12" sm="3" class="mb-2 mb-sm-0">
<PerformanceCard :title="card.title" :subTitle="card.subtitle" :description="card.content" :color="card.color"
:icon="card.icon" :tooltip="card?.tooltip">
</PerformanceCard>
</v-col>
</v-row>
<PaperCard class="w-100 mt-4">
<Chart :options="crHistoryOptions" />
</PaperCard>
<PaperCard class="w-100 mt-4">
<v-select
:items="cpHistoryData"
:item-title="(course) => course.curso"
:item-value="(course) => course"
v-model="currentCpCourse"
variant="outlined"
class="course-select"
/>
<v-select :items="cpHistoryData" :item-title="(course) => course.curso" :item-value="(course) => course"
v-model="currentCpCourse" variant="outlined" class="course-select" />
<Chart :options="cpHistoryOptions" />
</PaperCard>
<PaperCard class="w-100 mt-4">
Expand Down Expand Up @@ -87,6 +66,7 @@
});

const crHistorySeries = computed(() => {
console.log('crHistorySeries', crHistoryData.value)

Check warning on line 69 in apps/container/src/views/Performance/PerformanceView.vue

View workflow job for this annotation

GitHub Actions / quality (lint)

Unexpected console statement

Check warning on line 69 in apps/container/src/views/Performance/PerformanceView.vue

View workflow job for this annotation

GitHub Actions / quality (lint)

Unexpected console statement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opa, consegue retirar os console.log?

const arrCrHistory = crHistoryData.value?.map((quad) => {
const roundedCr = parseFloat(quad.cr_acumulado.toFixed(2));
return [formatSeason(quad.season), roundedCr];
Expand Down Expand Up @@ -184,6 +164,7 @@
select: (response) => response.data,
});

console.log('crDistributionSeries', crDistributionData.value)

Check warning on line 167 in apps/container/src/views/Performance/PerformanceView.vue

View workflow job for this annotation

GitHub Actions / quality (lint)

Unexpected console statement

Check warning on line 167 in apps/container/src/views/Performance/PerformanceView.vue

View workflow job for this annotation

GitHub Actions / quality (lint)

Unexpected console statement
const crDistributionSeries = computed(() => {
const arrCrDistribution = crDistributionData.value?.map((element) => {
return [Number(element._id), element.total];
Expand Down Expand Up @@ -249,6 +230,7 @@
});

const userMaxCr = computed(() => {
console.log('maxCR', crHistoryData.value)

Check warning on line 233 in apps/container/src/views/Performance/PerformanceView.vue

View workflow job for this annotation

GitHub Actions / quality (lint)

Unexpected console statement

Check warning on line 233 in apps/container/src/views/Performance/PerformanceView.vue

View workflow job for this annotation

GitHub Actions / quality (lint)

Unexpected console statement
const crAcumulados = crHistoryData.value?.map((quad) => quad.cr_acumulado);
if (crAcumulados) {
return Math.max(...crAcumulados).toFixed(2);
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export type User = {
ra: number;
createdAt: string;
devices: Device[];
permissions: string[];
};
Loading