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_NamgungJongMin 직원 관리 서비스 #59

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
97dc701
Initial commit
NamgungJongMin Aug 16, 2023
8790d5b
Feat: "Add signin.html"
NamgungJongMin Aug 16, 2023
de0fa36
Feat: "Add schema for validation of signin input"
NamgungJongMin Aug 16, 2023
c0e2381
Feat: "Add signin.js"
NamgungJongMin Aug 16, 2023
029d52b
Feat: "Initial tailwind setting"
NamgungJongMin Aug 16, 2023
1c783a0
Feat: "Add main.html"
NamgungJongMin Aug 16, 2023
51b851f
Style: "Modify email/password input style"
NamgungJongMin Aug 16, 2023
b96abd7
Chore: "Rename title in html"
NamgungJongMin Aug 17, 2023
7af55ac
Rename: "Modify directory structure"
NamgungJongMin Aug 17, 2023
6ce95c4
Feat: "Add action for signin page"
NamgungJongMin Aug 17, 2023
14f513f
Feat: "Add render.js for adding list in main.html"
NamgungJongMin Aug 17, 2023
00662b1
Feat: "Link to firebase-store"
NamgungJongMin Aug 17, 2023
dbc3513
Fix: "Fix incorrect style"
NamgungJongMin Aug 17, 2023
58ec663
Fix: "Fix render function"
NamgungJongMin Aug 17, 2023
fc6d5be
Chore: "Delete comment in render function"
NamgungJongMin Aug 17, 2023
466bf75
Feat: "Add delete feature"
NamgungJongMin Aug 18, 2023
dc70c35
Fix: "Modify function naming for get single data"
NamgungJongMin Aug 18, 2023
9dcc3af
Feat: "Add feature rendering target information"
NamgungJongMin Aug 18, 2023
aad37f1
Fix: "Ignore checkbox while click list"
NamgungJongMin Aug 18, 2023
651b94f
Feat: "Add feature editing in detail page"
NamgungJongMin Aug 18, 2023
dfeb9ad
Chore: "Organize code"
NamgungJongMin Aug 18, 2023
b55c876
Feat: "Guard no-auth user"
NamgungJongMin Aug 18, 2023
77f3220
Feat: "Add logout feature"
NamgungJongMin Aug 18, 2023
411c433
complete app v1
NamgungJongMin Aug 18, 2023
0767234
complete app v1
NamgungJongMin Aug 18, 2023
c7184fd
Merge branch 'KDT0_NamgungJongMin' of https://github.com/NamgungJongM…
NamgungJongMin Aug 18, 2023
0db897f
Update README.md
NamgungJongMin Aug 18, 2023
b7b2403
Update README.md
NamgungJongMin Aug 18, 2023
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
Prev Previous commit
Next Next commit
Feat: "Add feature rendering target information"
  • Loading branch information
NamgungJongMin committed Aug 18, 2023
commit 9dcc3af896e772f5462d044146e8938daf2db90d
21 changes: 12 additions & 9 deletions src/detail.html
Original file line number Diff line number Diff line change
@@ -22,15 +22,14 @@
</div>

<div class="md:flex-row md:items-start mt-16 flex w-full flex-col items-center bg-slate-100">
<input
type="image"
src="https://file2.nocutnews.co.kr/newsroom/image/2016/11/09/20161109000213391575.jpg"
class="h-80 border-slate-300 object-fill" />
<input type="image" src="" class="h-80 border-slate-300 object-fill" id="profile-image" />

<form id="detail-form" class="md:mt-0 md:pl-10 mt-4 w-full flex-col px-4">
<div class="flex flex-row items-center justify-between">
<div class="text-xl font-bold">임직원 정보</div>
<button class="rounded bg-slate-500 px-4 py-2 text-white hover:bg-blue-500">정보 변경</button>
<button class="rounded bg-slate-500 px-4 py-2 text-white hover:bg-blue-500" id="edit-button">
정보 변경
</button>
</div>

<div class="bar my-4 bg-slate-400"></div>
@@ -40,7 +39,8 @@
class="basis-2/4 border-b-2 border-slate-300 font-medium text-slate-600"
type="text"
disabled
value="남궁종민" />
name="person"
value="" />
</div>

<div class="flex w-full flex-row justify-between leading-10">
@@ -49,7 +49,8 @@
class="basis-2/4 border-b-2 border-slate-300 font-medium text-slate-600"
type="text"
disabled
value="vbghdl@naver.com" />
name="email"
value="" />
</div>

<div class="flex w-full flex-row justify-between leading-10">
@@ -58,7 +59,8 @@
class="basis-2/4 border-b-2 border-slate-300 font-medium text-slate-600"
type="text"
disabled
value="010-6428-6518" />
name="contact"
value="" />
</div>

<div class="flex w-full flex-row justify-between leading-10">
@@ -67,7 +69,8 @@
class="basis-2/4 border-b-2 border-slate-300 font-medium text-slate-600"
type="text"
disabled
value="개발부" />
name="division"
value="" />
</div>
</form>
</div>
21 changes: 21 additions & 0 deletions src/js/pages/detail/detail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// import loadData from './render.js';
import { getMember } from '../../firebase/firebase.js';
import loadData from './render.js';

const urlData = location.href.split('?')[1];
const $form = document.getElementById('detail-form');
const $editButton = document.getElementById('edit-button');

// $editButton.addEventListener('click', async e => {
// e.preventDefault();

// const receiveData = await getMember(urlData);

// await loadData(receiveData);
// });

window.addEventListener('DOMContentLoaded', async e => {
const receiveData = await getMember(urlData);

loadData($form, receiveData);
});
11 changes: 11 additions & 0 deletions src/js/pages/detail/render.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const loadData = ($form, data) => {
const profileImage = document.getElementById('profile-image');

profileImage.src = data.profileUrl;
$form.person.value = data.person;
$form.email.value = data.email;
$form.contact.value = data.contact;
$form.division.value = data.division;
};

export default loadData;