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

Update menu items #376

Merged
merged 7 commits into from
Feb 17, 2025
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: 6 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ NEXT_PUBLIC_TWITTER_URL=https://x.com/kpiuaofficial
NEXT_PUBLIC_CODE_OF_HONOR=https://kpi.ua/code
NEXT_PUBLIC_INTERNAL_REGULATIONS=https://kpi.ua/admin-rule
NEXT_PUBLIC_EDUCATIONAL_ORGANIZATION_REGULATION=https://kpi.ua/regulations
NEXT_PUBLIC_COMPLAINTS_FORM="https://docs.google.com/forms/d/e/1FAIpQLSdlWaMSxcYVSfYDZpVgygSIl8reTZBM2Nl2ZzyuZzdaFwef_w/viewform?embedded=true"
NEXT_PUBLIC_COMPLAINTS_FORM="https://docs.google.com/forms/d/e/1FAIpQLSdlWaMSxcYVSfYDZpVgygSIl8reTZBM2Nl2ZzyuZzdaFwef_w/viewform?embedded=true"
NEXT_PUBLIC_SCHEDULE_URL=https://schedule.kpi.ua
NEXT_PUBLIC_UNIVERSITY_NOTICE_BOARD_URL=https://kpi.ua/boardlist/
NEXT_PUBLIC_LIBRARY_DISCOVERY_URL=https://discovery.kpi.ua/
NEXT_PUBLIC_UNIVERSITY_NEWS=https://kpi.ua/news/
NEXT_PUBLIC_STUDENT_COUNCIL==https://sc.kpi.ua/
7 changes: 6 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ NEXT_PUBLIC_TWITTER_URL=https://x.com/kpiuaofficial
NEXT_PUBLIC_CODE_OF_HONOR=https://kpi.ua/code
NEXT_PUBLIC_INTERNAL_REGULATIONS=https://kpi.ua/admin-rule
NEXT_PUBLIC_EDUCATIONAL_ORGANIZATION_REGULATION=https://kpi.ua/regulations
NEXT_PUBLIC_COMPLAINTS_FORM="https://docs.google.com/forms/d/e/1FAIpQLSdlWaMSxcYVSfYDZpVgygSIl8reTZBM2Nl2ZzyuZzdaFwef_w/viewform?embedded=true"
NEXT_PUBLIC_COMPLAINTS_FORM="https://docs.google.com/forms/d/e/1FAIpQLSdlWaMSxcYVSfYDZpVgygSIl8reTZBM2Nl2ZzyuZzdaFwef_w/viewform?embedded=true"
NEXT_PUBLIC_SCHEDULE_URL=https://schedule.kpi.ua
NEXT_PUBLIC_UNIVERSITY_NOTICE_BOARD_URL=https://kpi.ua/boardlist/
NEXT_PUBLIC_LIBRARY_DISCOVERY_URL=https://discovery.kpi.ua/
NEXT_PUBLIC_UNIVERSITY_NEWS=https://kpi.ua/news/
NEXT_PUBLIC_STUDENT_COUNCIL==https://sc.kpi.ua/
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
[![GitHub license](https://img.shields.io/github/license/kpi-ua/ecampus.kpi.ua.svg)](https://github.com/kpi-ua/ecampus.kpi.ua/blob/master/LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/kpi-ua/ecampus.kpi.ua.svg)](https://GitHub.com/kpi-ua/ecampus.kpi.ua/graphs/contributors/)
[![GitHub issues](https://img.shields.io/github/issues/kpi-ua/ecampus.kpi.ua.svg)](https://GitHub.com/kpi-ua/ecampus.kpi.ua/issues/)
[![GitHub pull-requests](https://img.shields.io/github/issues-pr/kpi-ua/ecampus.kpi.ua.svg)](https://GitHub.com/kpi-ua/ecampus.kpi.ua/pulls/)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
![Docker Image Version (latest by date)](https://img.shields.io/docker/v/kpiua/ecampus-kpi-ua)

[![GitHub watchers](https://img.shields.io/github/watchers/kpi-ua/ecampus.kpi.ua.svg?style=social&label=Watch)](https://GitHub.com/kpi-ua/ecampus.kpi.ua/watchers/)
[![GitHub forks](https://img.shields.io/github/forks/kpi-ua/ecampus.kpi.ua.svg?style=social&label=Fork)](https://GitHub.com/kpi-ua/ecampus.kpi.ua/network/)
[![GitHub stars](https://img.shields.io/github/stars/kpi-ua/ecampus.kpi.ua.svg?style=social&label=Star)](https://GitHub.com/kpi-ua/ecampus.kpi.ua/stargazers/)

# Electronic Campus of Igor Sikorsky Kyiv Polytechnic Institute

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/kpiua/ecampus.kpi.ua)](https://hub.docker.com/r/kpiua/ecampus.kpi.ua)
[![GitHub license](https://img.shields.io/github/license/kpi-ua/ecampus.kpi.ua.svg)](https://github.com/kpi-ua/ecampus.kpi.ua/blob/master/LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/kpi-ua/ecampus.kpi.ua.svg)](https://GitHub.com/kpi-ua/ecampus.kpi.ua/graphs/contributors/)

The information system "Electronic Campus of Igor Sikorsky Kyiv Polytechnic Institute" is an automated system supporting educational process informatization. It provides digital communication tools for students, faculty, and department heads, enhancing educational quality through modern technology.

Expand Down Expand Up @@ -52,21 +43,21 @@ npm run storybook
### Build container

```shell
docker build ./ --file ./Dockerfile --tag kpiua/ecampus-kpi-ua:latest
docker build ./ --file ./Dockerfile --tag kpiua/ecampus.kpi.ua:latest
```

### Run

#### Run with default settings

```shell
docker run --rm -it -p 80:80/tcp kpiua/ecampus-kpi-ua:latest
docker run --rm -it -p 3000:3000/tcp kpiua/ecampus.kpi.ua:latest
```

#### Run with custom settings

```shell
docker run --rm -it -e CAMPUS_API_BASE_PATH=https://dev-api.campus.cloud.kpi.ua -p 80:80/tcp kpiua/ecampus-kpi-ua:latest
docker run --rm -it -e CAMPUS_API_BASE_PATH=https://dev-api.campus.cloud.kpi.ua -p 80:80/tcp kpiua/ecampus.kpi.ua:latest
```

or
Expand All @@ -76,7 +67,7 @@ docker run --rm -it \
-e CAMPUS_API_BASE_PATH=https://dev-api.campus.cloud.kpi.ua \
-e COOKIE_DOMAIN=localhost \
-e NEXT_PUBLIC_RECAPTCHA_KEY=6LeMy30qAAAAAIC6KUhNfReP-Us5wkrkp3FLfOgl \
-p 80:80/tcp kpiua/ecampus-kpi-ua:latest
-p 3000:3000/tcp kpiua/ecampus.kpi.ua:latest
```

## Adding translations
Expand Down
6 changes: 0 additions & 6 deletions src/actions/menu.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ const getStaticMenuItems = async (): Promise<MenuItemMeta[][]> => {
url: '/notice-board',
isExternal: false,
},
{
name: 'feedback',
title: t('feedback'),
url: '/feedback',
isExternal: false,
},
{
name: 'settings',
title: t('settings'),
Expand Down
30 changes: 25 additions & 5 deletions src/app/[locale]/(private)/cards/information-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,49 @@ import { Card, CardContent } from '@/components/ui/card';
import { cn } from '@/lib/utils';
import { useTranslations } from 'next-intl';
import { Link } from '@/i18n/routing';
import { Separator } from '@/components/ui/separator';

interface InformationCardProps {
className?: string;
}

export const InformationCard = ({ className }: InformationCardProps) => {
const t = useTranslations('private.main.cards.information');

return (
<Card className={cn(className)}>
<CardContent className="p-10">
<Heading3 className="mb-6">{t('title')}</Heading3>
<Paragraph className="my-1">
<Link href="#">{t('schedule')}</Link>
<Link href={process.env.NEXT_PUBLIC_SCHEDULE_URL!} target="_blank" rel="noopener noreferrer">
{t('schedule')}
</Link>
</Paragraph>
<Paragraph className="my-1">
<Link href={process.env.NEXT_PUBLIC_UNIVERSITY_NOTICE_BOARD_URL!} target="_blank" rel="noopener noreferrer">
{t('university-notice-board')}
</Link>
</Paragraph>
<Paragraph className="my-1">
<Link href={process.env.NEXT_PUBLIC_LIBRARY_DISCOVERY_URL!} target="_blank" rel="noopener noreferrer">
{t('library-discovery')}
</Link>
</Paragraph>
<Paragraph className="my-1">
<Link href={process.env.NEXT_PUBLIC_UNIVERSITY_NEWS!} target="_blank" rel="noopener noreferrer">
{t('university-news')}
</Link>
</Paragraph>
<Paragraph className="my-1">
<Link href="/notice-board">{t('notice-board')}</Link>
<Link href={process.env.NEXT_PUBLIC_STUDENT_COUNCIL!} target="_blank" rel="noopener noreferrer">
{t('student-council')}
</Link>
</Paragraph>
<Separator className="my-4" />
<Paragraph className="my-1">
<Link href="#">{t('faq')}</Link>
<Link href="/frequently-asked-questions">{t('faq')}</Link>
</Paragraph>
<Paragraph className="my-1">
<Link href="#">{t('user-manual')}</Link>
<Link href="/user-manual">{t('user-manual')}</Link>
</Paragraph>
</CardContent>
</Card>
Expand Down
24 changes: 0 additions & 24 deletions src/app/[locale]/(private)/feedback/page.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/[locale]/(private)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function Home() {
<div className="grid auto-rows-max grid-cols-12 gap-[20px] lg:auto-rows-auto">
<Greeting className="col-span-full" />
<AnnouncementsCard className="col-span-full w-full 2xl:col-span-8" />
<InformationCard className="3xl:col-span-3 col-span-full lg:col-span-6 lg:row-span-2 xl:col-span-4 xl:row-span-2" />
<InformationCard className="col-span-full lg:col-span-6 xl:col-span-4" />
<SocialNetworksCard className="col-span-full lg:col-span-6 xl:col-span-4" />
<SupportCard className="col-span-full lg:col-span-6 xl:col-span-4" />
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/components/app-sidebar/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import dayjs from 'dayjs';
import { useTranslations } from 'next-intl';

const createFooterLinks = (t: ReturnType<typeof useTranslations>) => [
{ title: t('user-manual'), url: '/user-manual' },
{ title: t('faq'), url: '/frequently-asked-questions' },
{ title: t('about'), url: '/about' },
{ title: t('documents'), url: '/kpi-documents' },
{ title: t('terms-of-service'), url: '/terms-of-service' },
Expand Down
2 changes: 1 addition & 1 deletion src/components/app-sidebar/menu-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const menuIcon: Map<string, React.ReactNode> = new Map([
['profile', UserCircle],
['current-superintendence', CircleWavyCheck],
['certification-results', Exam],
['feedback', ChatCenteredText],
['msg', ChatCenteredText],
['employment', BagSimple],
['settings', Gear],
['sdchoice2021admin', ListNumbers],
Expand Down
10 changes: 5 additions & 5 deletions src/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,8 @@
"menu": {
"main": "Home",
"profile": "Profile",
"feedback": "Send feedback",
"settings": "Settings",
"user-manual": "User manual",
"faq": "Frequently asked questions",
"about": "About",
"documents": "KPI documents",
"terms-of-service": "Terms of service",
"contacts": "Contacts",
Expand Down Expand Up @@ -190,9 +187,12 @@
"information": {
"title": "Information",
"schedule": "Schedule",
"notice-board": "Notice board",
"faq": "Frequently asked questions",
"user-manual": "User manual"
"user-manual": "User manual",
"university-notice-board": "University notice board",
"library-discovery": "Library catalog",
"university-news": "University news",
"student-council": "Student council"
},
"social-networks": {
"title": "Social Networks",
Expand Down
10 changes: 5 additions & 5 deletions src/messages/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@
"menu": {
"main": "Головна",
"profile": "Профіль",
"feedback": "Відправити відгук",
"settings": "Налаштування",
"user-manual": "Інструкція користувача",
"faq": "Поширенi запитання",
"about": "Про систему",
"documents": "Документи КПІ",
"terms-of-service": "Правила використання",
Expand Down Expand Up @@ -190,9 +187,12 @@
"information": {
"title": "Інформація",
"schedule": "Розклад занять та сесії",
"notice-board": "Дошка оголошень",
"faq": "Поширенi запитання",
"user-manual": "Інструкція користувача"
"user-manual": "Інструкція користувача",
"university-notice-board": "Загальноуніверситетські оголошення",
"library-discovery": "Каталог бібліотеки",
"university-news": "Новини університету",
"student-council": "Студентська рада"
},
"social-networks": {
"title": "Соціальні мережі",
Expand Down
Loading