Skip to content

Commit

Permalink
## 🚀 feat: Add complete layout and user panel components
Browse files Browse the repository at this point in the history
🛠️ **This commit includes the following changes:**
- Implemented layout components to structure the application interface, providing a consistent visual layout across all pages.
- Created user panel components to facilitate user interaction and management within the application.
- Populated various pages with fake data to simulate realistic scenarios and ensure functionality across different sections.
- Enhanced overall styling and visual elements to improve the user experience and interface aesthetics.

👍 **These changes establish a robust foundation for the application layout and user panel, offering a structured interface for users to navigate and interact with various features. The integration of fake data ensures that the functionality is tested under realistic conditions, while the visual enhancements contribute to a more engaging user experience.**
  • Loading branch information
ilyasbozdemir committed May 2, 2024
1 parent 99150ee commit d1acc04
Show file tree
Hide file tree
Showing 35 changed files with 2,393 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ public record LibraryBranchDTO : BaseAuditableDTO<Guid>
public string Address { get; init; }
public string PhoneNumber { get; init; }
public string Description { get; init; }
public int MaxCheckoutLimit { get; set; } // Azami ödünç alma adedi
public int MinCheckoutDurationInDays { get; set; } // Asgari teslim süresi (gün cinsinden)
public int MaxCheckoutDurationInDays { get; set; } // Azami teslim süresi (gün cinsinden)
public int CriticalLevelThreshold { get; set; } // Eser kritik seviyesi

public bool NotifyOnBookOrBlogComment { get; set; } // Eser veya blog yorumu bildirimi açık mı?

public int TopMembersReportLimit { get; set; } // En çok okuyan üyeler raporunda listelenecek maksimum üye sayısı
public int TopBooksReportLimit { get; set; } // En çok okuyan eserler raporunda listelenecek maksimum eser sayısı
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ public async Task<GetAllLibraryBranchesQueryResponse> Handle(GetAllLibraryBranch
Description = libraryBranch.Description,
Address = libraryBranch.Address,
PhoneNumber = libraryBranch.PhoneNumber,

MaxCheckoutLimit = libraryBranch.MaxCheckoutLimit,
MinCheckoutDurationInDays = libraryBranch.MinCheckoutDurationInDays,
MaxCheckoutDurationInDays = libraryBranch.MaxCheckoutDurationInDays,
CriticalLevelThreshold = libraryBranch.CriticalLevelThreshold,
NotifyOnBookOrBlogComment = libraryBranch.NotifyOnBookOrBlogComment,
TopMembersReportLimit = libraryBranch.TopMembersReportLimit,
TopBooksReportLimit = libraryBranch.TopBooksReportLimit,

});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,4 @@ public enum WorkFormat
/// </summary>
Thesis = 1 << 4,

/// <summary>
/// Eser öneri formatında.
/// </summary>
Recommendation = 1 << 5

}
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ const LoginPage = () => {
Şifremi Unuttum
</CLink>
</Stack>
<Text fontSize="sm" mt={2} textAlign="center">
Giriş yaparak gizlilik sözleşmemizi kabul etmiş olursunuz.{" "}
<Link href="/privacy-policy" target={"_blank"}>
<Text color="teal.500">
Sözleşme metnine buradan ulaşabilirsiniz.
</Text>
</Link>
</Text>
<Button
type="submit"
colorScheme={"blue"}
Expand All @@ -137,9 +145,9 @@ const LoginPage = () => {
</Stack>
</Center>

<Text as='small' mt={5}>
Not: herhangi bir username ve password ile girilebilir su an
backende tam olarak baglanmamıstır.
<Text as="small" mt={5}>
Not: herhangi bir username ve password ile girilebilir su an backende
tam olarak baglanmamıstır.
</Text>
</Container>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ import {
InputGroup,
InputRightElement,
IconButton,
Select,
Text,
} from "@chakra-ui/react";
import { NextSeo } from "next-seo";
import AuthService from "@/services/authService";
import { IoEyeOffOutline, IoEyeOutline } from "react-icons/io5";
import Link from "next/link";

const RegisterPage = () => {
const toast = useToast();
Expand All @@ -38,6 +41,7 @@ const RegisterPage = () => {
values.name = "";
values.surname = "";
values.email = "";
values.userType = "";
values.telNumber = "";
values.password = "";
};
Expand All @@ -48,6 +52,7 @@ const RegisterPage = () => {
name: "",
surname: "",
email: "",
userType: "",
telNumber: "",
password: "",
confirmPassword: "",
Expand Down Expand Up @@ -83,6 +88,21 @@ const RegisterPage = () => {
telNumber: Yup.string()
.matches(/^\d{10}$/, "Geçerli bir telefon numarası girin")
.required("Telefon zorunlu"),
userType: Yup.string()
.required("Kullanıcı türü zorunlu")
.oneOf(
[
"user",
"manager",
"student",
"teacher",
"parent",
"library-responsible",
"employee",
"other",
],
"Geçerli bir kullanıcı türü seçin"
),
password: Yup.string()
.min(5, "Şifre en az 5 karakter olmalı")
.matches(/[a-zğüşıöç]/, "Şifre en az bir küçük harf içermeli")
Expand Down Expand Up @@ -233,6 +253,32 @@ const RegisterPage = () => {
/>
<FormErrorMessage>{formik.errors.telNumber}</FormErrorMessage>
</FormControl>
<FormControl
id="userType"
mt={4}
isInvalid={formik.touched.userType && formik.errors.userType}
>
<FormLabel>Kullanıcı Türü</FormLabel>
<Select
placeholder="Kullanıcı türünü seçin"
value={formik.values.userType}
onChange={formik.handleChange}
onBlur={formik.handleBlur}
name="userType"
>
<option value="user">Normal Kullanıcı</option>
<option value="manager">Yönetici</option>
<option value="student">Öğrenci</option>
<option value="teacher">Öğretmen</option>
<option value="parent">Veli</option>
<option value="library-responsible">
Kütüphane Sorumlusu
</option>
<option value="employee">Çalışan</option>
<option value="other">Diğer</option>
</Select>
<FormErrorMessage>{formik.errors.userType}</FormErrorMessage>
</FormControl>
<FormControl
id="password"
isInvalid={formik.touched.password && formik.errors.password}
Expand Down Expand Up @@ -279,6 +325,14 @@ const RegisterPage = () => {
{formik.errors.confirmPassword}
</FormErrorMessage>
</FormControl>
<Text fontSize="sm" mt={2} textAlign="center">
Kayıt olarak gizlilik sözleşmemizi kabul etmiş olursunuz.{" "}
<Link href="/privacy-policy" target={'_blank'}>
<Text color="teal.500">
Sözleşme metnine buradan ulaşabilirsiniz.
</Text>
</Link>
</Text>
<Button type="submit" colorScheme="teal" w={"full"} mt={4}>
Kayıt Ol
</Button>
Expand Down
11 changes: 8 additions & 3 deletions LibraryTrackingApp/src/frontend/constants/appSidebarItems.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
FiSettings,
FiLogOut,
FiBook,
FiHelpCircle,
} from "react-icons/fi";
import {
BsArrowLeftRight,
Expand Down Expand Up @@ -207,6 +206,12 @@ export const sidebarItems = [
href: "/app/borrow/return",
target: "_self",
},
{
icon: <IoCreateOutline />,
title: "Uzatma İstekleri",
href: "/app/borrow/extension-requests",
target: "_self",
},
{
icon: <CiBoxList />,
title: "Ödünç Kitapları Listele",
Expand All @@ -223,8 +228,8 @@ export const sidebarItems = [
subItems: [
{
icon: <IoCreateOutline />,
title: "Ödünç Ver",
href: 'book-tag/new',
title: "Yeni Ekle",
href: "book-tag/new",
target: "_self",
},
{
Expand Down
54 changes: 54 additions & 0 deletions LibraryTrackingApp/src/frontend/constants/meSidebarItems.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import {
FaBook,
FaClock,
FaExchangeAlt,
FaHistory,
FaQuestionCircle,
FaUser,
FaUsers,
} from "react-icons/fa";

export const meSidebarItems = [
{
title: "Profil Yönetimi",
icon: <FaUser />,
href: "/me/profile",
target: "_self",
subItems: [],
},
{
title: "Kütüphane Yönetimi",
icon: <FaBook />,
href: "/me/library",
target: "_self",
subItems: [],
},
{
title: "Kitap Alım ve Teslim",
icon: <FaExchangeAlt />,
href: "/me/borrow",
target: "_self",
subItems: [],
},
{
title: "Geçmiş Alınan Kitaplar",
icon: <FaHistory />,
href: "/me/past-books",
target: "_self",
subItems: [],
},
{
title: "Destek",
icon: <FaQuestionCircle />,
href: "/me/support",
target: "_self",
subItems: [],
},
{
title: "Sosyalleşme",
icon: <FaUsers />,
href: "/me/social",
target: "_self",
subItems: [],
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ const SidebarItem = ({ icon, text, href, target, isActive, subItems }) => {
onClick={subItems?.length > 0 ? handleToggle : null}
as={subItems?.length > 0 ? null : Link}
href={href}
target={target}

>
{text}
</Button>
Expand Down
Loading

0 comments on commit d1acc04

Please sign in to comment.