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

KDT0_Lee_Yeon_Su 직원 관리 서비스 #62

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 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
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "employee-management-59973"
}
}
72 changes: 72 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
firebase-debug.*.log*

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# firebase file
keys.js

Choose a reason for hiding this comment

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

gitignore파일이 정상적으로 동작하지 않는 거 같아요. keys파일 노출되어 있어요!

Copy link
Member

Choose a reason for hiding this comment

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

git이 track을 시작한 시점 이후에 .gitignore에 추가돼서 그렇습니다.

  • 0a5794a - keys.js가 추가된 시점
  • db17ea5 - .gitignore가 업데이트된 시점

Removing sensitive data from a repository를 참고하셔서 파일을 지우시거나, 간단하게 keys.js를 삭제하는 커밋을 남기고 key를 모두 만료시키고 새로 발급하시는 게 좋을 것 같네요.

.firebaserc
firestore.rules
storage.rules
81 changes: 35 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,38 @@
# 직원 관리 서비스

# :camera: 직원 사진 관리 서비스

직원들의 사진을 관리할 수 있는 사진 관리자 서비스를 만들어 보세요.

과제 수행 및 리뷰 기간은 별도 공지를 참고하세요!
## [과제 수행 및 제출 방법]
1. 현재 저장소를 로컬에 클론(Clone)합니다.
2. 자신의 본명으로 브랜치를 생성합니다.(구분 가능하도록 본명을 꼭 파스칼케이스로 표시하세요, git branch KDT0_이름)
3. 자신의 본명 브랜치에서 과제를 수행합니다.
4. 과제 수행이 완료되면, 자신의 본명 브랜치를 원격 저장소에 푸시(Push)합니다.(main 브랜치에 푸시하지 않도록 꼭 주의하세요, git push origin KDT0_이름)
5. 저장소에서 main 브랜치를 대상으로 Pull Request 생성하면, 과제 제출이 완료됩니다!(E.g, main <== KDT0_이름)
6. Pull Request 링크를 LMS로도 제출해 주셔야 합니다.
7. main 혹은 다른 사람의 브랜치로 절대 병합하지 않도록 주의하세요!
8. Pull Request에서 보이는 설명을 다른 사람들이 이해하기 쉽도록 꼼꼼하게 작성하세요!
9. Pull Request에서 과제 제출 후 절대 병합(Merge)하지 않도록 주의하세요!
10. 과제 수행 및 제출 과정에서 문제가 발생한 경우, 바로 담당 멘토나 강사에서 얘기하세요!

## [필수 요구사항]
- “AWS S3 / Firebase 같은 서비스”를 이용하여 사진을 관리할 수 있는 페이지를 구현하세요.
- 프로필 페이지를 개발하세요.
- 스크롤이 가능한 형태의 리스팅 페이지를 개발하세요.
- 전체 페이지 데스크탑-모바일 반응형 페이지를 개발하세요.
- 사진을 등록, 수정, 삭제가 가능해야 합니다.
- 유저 플로우를 제작하여 리드미에 추가하세요.
* CSS
* 애니메이션 구현
* 상대수치 사용(rem, em)
* JavaScript
* DOM event 조작

## [선택 요구사항]
- 사진 관리 페이지와 관련된 기타 기능도 고려해 보세요.
- 페이지가 보여지기 전에 로딩 애니메이션이 보이도록 만들어보세요.
- 직원을 등록, 수정, 삭제가 가능하게 해보세요.
- 직원 검색 기능을 추가해 보세요.
- infinity scroll 기능을 추가해 보세요.
- 사진을 편집할 수 있는 기능을 추가해 보세요.
- LocalStorage 사용

## [화면 예시]
![Untitled (1)](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/38754963/5dda6755-2501-4af4-bc3e-b63a353c44c2)

![Untitled (2)](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/38754963/6c1805f1-2b00-453e-a729-2b483612726d)

## [흐름]
![Untitled](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/38754963/e2934c05-26f6-4ef6-88d4-beed76aa007a)
## ✨ 프로젝트 소개
* 배포주소 : https://my-employee-management.netlify.app/

<br>

## ✨ 기술 스택
<div style="display:flex;">
<img src="https://img.shields.io/badge/html5-E34F26?style=for-the-badge&logo=html5&logoColor=white">
<img src="https://img.shields.io/badge/css-1572B6?style=for-the-badge&logo=css3&logoColor=white">
<img src="https://img.shields.io/badge/javascript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black">
<img src="https://img.shields.io/badge/Firebase-FFCA28?style=for-the-badge&logo=firebase&logoColor=black"/>
</div>

<br>

## ✔ 구현 내용
* 직원 리스트
![image](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/111065848/1983a5d2-a52a-442a-bb6f-aabf2fc44089)
* 직원 등록
![image](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/111065848/f4c40e89-90dd-494f-9b04-e5fc5842b499)
* 직원 상세, 수정, 삭제
![image](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/111065848/20ee2135-b8a0-413f-9c74-914456ec1652)
* 여러 직원 삭제
![image](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/111065848/f5b0b504-4a07-4e03-aa66-ff3c5f572eae)

<br>

## ✨ 유저 플로우
![유저플로우 drawio](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/111065848/b2a7480e-9084-437d-a825-81faf6657051)


<br>

## 📌 회고
* 파이어베이스를 처음 사용해보는데 연동하는 것이 조금 어려웠다.
* 검색 기능을 구현하지 못해 아쉽다.
9 changes: 9 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"storage": {
"rules": "storage.rules"
}
}
4 changes: 4 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"indexes": [],
"fieldOverrides": []
}
9 changes: 9 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
rules_version = '2';

service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
}
}
183 changes: 183 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./src/css/reset.css" />
<link rel="stylesheet" href="./src/css/animation.css" />
<link rel="stylesheet" href="./src/css/header.css" />
<link rel="stylesheet" href="./src/css/table.css" />
<link rel="stylesheet" href="./src/css/modal.css" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap"
rel="stylesheet"
/>
<title>직원관리</title>
</head>
<body>
<!-- 시작 애니메이션 -->
<div class="animation">
<div class="loading-container">
<div class="loading"></div>
<div id="loading-text">loading</div>
</div>
<a href="./index.html" title="employee-management.com" id="link"
suehub marked this conversation as resolved.
Show resolved Hide resolved
>employee-management.com</a
>
</div>

<div class="main">
<!-- 헤더 -->
<div class="header">
<div class="header__icon" onclick="location.href='index.html'">
<img
src="./src/image/free-icon-team-management-6103262.png"
alt="메인 아이콘"
class="main__icon"
loading="lazy"
/>
<span>직원관리</span>
</div>
<div class="employee-search__wrapper">
<span class="material-symbols-outlined search-icon">search</span>
<input
type="text"
class="employee-search__input"
placeholder="이름 또는 이메일로 검색하기"
/>
</div>
<div class="button__wrapper">
<button type="button" class="employee-add__button">직원 등록</button>
<button type="button" class="employee-delete__button">
직원 삭제
</button>

</div>
</div>

<!-- 직원 데이터 테이블 -->
<section class="employee-table__warpper">
<table class="employee-table">
<tr>
<th>
<input id="check__btn" class="checkbox__all" type="checkbox" />
<label for="check__btn"></label>
</th>
<th>프로필</th>
<th>이름</th>
<th>이메일</th>
<th>휴대폰번호</th>
<th>입사날짜</th>
</tr>
</table>
</section>

<!-- 직원 등록 모달 -->
<div class="modal__background">
<modal class="employee-add__modal">
suehub marked this conversation as resolved.
Show resolved Hide resolved
<h1>직원 등록</h1>
<span class="material-symbols-outlined close-icon">close</span>
<form id="employee__form">
<div class="add-file__wrapper">
<img class="add-data__img" />
<input class="add-data__file" accept="image/*" type="file" />
</div>
<div class="add-data">
<label>이름</label>
<input
suehub marked this conversation as resolved.
Show resolved Hide resolved
class="add-data__name"
type="text"
placeholder="이름을 입력하세요"
/>
</div>
<div class="add-data">
<label>이메일</label>
<input
class="add-data__email"
type="email"
placeholder="이메일을 입력하세요"
/>
</div>
<div class="add-data">
<label>휴대폰 번호</label>
<input
class="add-data__tel"
type="tel"
placeholder="휴대폰 번호를 입력하세요"
/>
</div>
<div class="add-data">
<label>입사날짜</label>
<input class="add-data__date" type="date" />
</div>
<button class="submit__button" type="submit">등록</button>
</form>
</modal>
</div>

<!-- 직원 상세 모달 -->
<div class="detail-modal__background">
<modal class="employee-detail__modal">
<h1>직원 정보</h1>
<span class="material-symbols-outlined close__icon">close</span>
<form id="employee__form">
<div class="add-file__wrapper">
<img class="detail__img" />
<input class="update-data__file" accept="image/*" type="file" />
</div>
<div class="add-data">
<label>이름</label>
<input
class="detail__name"
type="text"
placeholder="이름을 입력하세요"
/>
</div>
<div class="add-data">
<label>이메일</label>
<input
class="detail__email"
type="email"

Choose a reason for hiding this comment

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

복잡한 정규식만 생각했었는데..! type 활용하는 방법 리마인드하고 가요✨

placeholder="이메일을 입력하세요"
/>
</div>
<div class="add-data">
<label>휴대폰 번호</label>
<input
class="detail__tel"
type="tel"
placeholder="휴대폰 번호를 입력하세요"
/>
</div>
<div class="add-data">
<label>입사날짜</label>
<input class="detail__date" type="date" />
</div>
<div class="detail-button__wrapper">
<button class="edit__button" type="button">저장</button>
<button class="delete__button" type="button">삭제</button>
</div>
</form>
</modal>
</div>

<script src="./src/js/animation.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.5/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.5/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.5/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.5/firebase-storage.js"></script>
<script type="module" src="./src/js/firebaseConfig.js"></script>
<script type="module" src="./src/js/firebaseData.js"></script>
<script type="module" src="./src/js/main.js"></script>
</body>
</html>
Loading