jamesLeeeeeee commited on
Commit
16b3bc4
·
verified ·
1 Parent(s): 0f7d155

뭐야 이게? 구도는 다 망가지고 드래그앤드랍도안되고.

Browse files
Files changed (3) hide show
  1. deployment.html +18 -42
  2. deployment.js +2 -6
  3. style.css +25 -1
deployment.html CHANGED
@@ -76,23 +76,13 @@
76
  배포 시작하기
77
  </button>
78
  </div>
79
-
80
  <!-- 칸반 보드 -->
81
  <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
82
  <!-- 대기 문서 -->
83
  <div class="bg-gray-50 rounded-xl p-4">
84
  <h3 class="font-semibold text-gray-800 mb-4 text-center">대기 문서 📥</h3>
85
  <div id="waitingColumn" class="space-y-4 min-h-96">
86
- <div class="document-card bg-white rounded-lg p-4 shadow-md border border-gray-200 cursor-move" draggable="true" data-document-id="1">
87
- <div class="flex justify-between items-start mb-2">
88
- <span class="text-sm font-medium text-gray-700">건축 도면 #2456</span>
89
- <span class="priority-badge bg-red-100 text-red-800 px-2 py-1 rounded-full text-xs">높음</span>
90
- </div>
91
- <div class="text-xs text-gray-500 mb-2">도면</div>
92
- <div class="flex justify-between items-center">
93
- <span class="text-xs text-gray-400">마감: 2024-03-15</span>
94
- <button class="worker-select-btn text-xs bg-primary-500 text-white px-2 py-1 rounded">작업자 선택</button>
95
- </div>
96
  </div>
97
  </div>
98
 
@@ -100,16 +90,7 @@
100
  <div class="bg-blue-50 rounded-xl p-4">
101
  <h3 class="font-semibold text-blue-800 mb-4 text-center">배포 중 🚀</h3>
102
  <div id="deployingColumn" class="space-y-4 min-h-96">
103
- <div class="document-card bg-white rounded-lg p-4 shadow-md border border-gray-200 cursor-move" draggable="true" data-document-id="2">
104
- <div class="flex justify-between items-start mb-2">
105
- <span class="text-sm font-medium text-gray-700">시공 계획서 #1890</span>
106
- <span class="priority-badge bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs">보통</span>
107
- </div>
108
- <div class="text-xs text-gray-500 mb-2">계획서</div>
109
- <div class="flex justify-between items-center">
110
- <span class="text-xs text-gray-400">마감: 2024-03-20</span>
111
- <button class="worker-select-btn text-xs bg-primary-500 text-white px-2 py-1 rounded">재배포</button>
112
- </div>
113
  </div>
114
  </div>
115
 
@@ -117,16 +98,7 @@
117
  <div class="bg-yellow-50 rounded-xl p-4">
118
  <h3 class="font-semibold text-yellow-800 mb-4 text-center">진행 중 ⚡</h3>
119
  <div id="progressColumn" class="space-y-4 min-h-96">
120
- <div class="document-card bg-white rounded-lg p-4 shadow-md border border-gray-200 cursor-move" draggable="true" data-document-id="3">
121
- <div class="flex justify-between items-start mb-2">
122
- <span class="text-sm font-medium text-gray-700">공사 명세서 #3124</span>
123
- <span class="priority-badge bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">낮음</span>
124
- </div>
125
- <div class="text-xs text-gray-500 mb-2">명세서</div>
126
- <div class="flex justify-between items-center">
127
- <span class="text-xs text-gray-400">마감: 2024-03-25</span>
128
- <button class="worker-select-btn text-xs bg-primary-500 text-white px-2 py-1 rounded">작업자 변경</button>
129
- </div>
130
  </div>
131
  </div>
132
 
@@ -134,20 +106,24 @@
134
  <div class="bg-green-50 rounded-xl p-4">
135
  <h3 class="font-semibold text-green-800 mb-4 text-center">완료 ✅</h3>
136
  <div id="completedColumn" class="space-y-4 min-h-96">
137
- <div class="document-card bg-white rounded-lg p-4 shadow-md border border-gray-200 cursor-move" draggable="true" data-document-id="4">
138
- <div class="flex justify-between items-start mb-2">
139
- <span class="text-sm font-medium text-gray-700">안전 계획서 #4567</span>
140
- <span class="priority-badge bg-red-100 text-red-800 px-2 py-1 rounded-full text-xs">높음</span>
141
- </div>
142
- <div class="text-xs text-gray-500 mb-2">계획서</div>
143
- <div class="flex justify-between items-center">
144
- <span class="text-xs text-gray-400">마감: 2024-03-12</span>
145
- <button class="worker-select-btn text-xs bg-primary-500 text-white px-2 py-1 rounded">검수 대기</button>
146
- </div>
147
  </div>
148
  </div>
149
  </div>
150
- </main>
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
  <custom-footer></custom-footer>
153
 
 
76
  배포 시작하기
77
  </button>
78
  </div>
 
79
  <!-- 칸반 보드 -->
80
  <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
81
  <!-- 대기 문서 -->
82
  <div class="bg-gray-50 rounded-xl p-4">
83
  <h3 class="font-semibold text-gray-800 mb-4 text-center">대기 문서 📥</h3>
84
  <div id="waitingColumn" class="space-y-4 min-h-96">
85
+ <!-- 동적으로 생성될 문서 카드들 -->
 
 
 
 
 
 
 
 
 
86
  </div>
87
  </div>
88
 
 
90
  <div class="bg-blue-50 rounded-xl p-4">
91
  <h3 class="font-semibold text-blue-800 mb-4 text-center">배포 중 🚀</h3>
92
  <div id="deployingColumn" class="space-y-4 min-h-96">
93
+ <!-- 동적으로 생성될 문서 카드들 -->
 
 
 
 
 
 
 
 
 
94
  </div>
95
  </div>
96
 
 
98
  <div class="bg-yellow-50 rounded-xl p-4">
99
  <h3 class="font-semibold text-yellow-800 mb-4 text-center">진행 중 ⚡</h3>
100
  <div id="progressColumn" class="space-y-4 min-h-96">
101
+ <!-- 동적으로 생성될 문서 카드들 -->
 
 
 
 
 
 
 
 
 
102
  </div>
103
  </div>
104
 
 
106
  <div class="bg-green-50 rounded-xl p-4">
107
  <h3 class="font-semibold text-green-800 mb-4 text-center">완료 ✅</h3>
108
  <div id="completedColumn" class="space-y-4 min-h-96">
109
+ <!-- 동적으로 생성될 문서 카드들 -->
 
 
 
 
 
 
 
 
 
110
  </div>
111
  </div>
112
  </div>
113
+
114
+ <!-- 작업자 선택 모달 -->
115
+ <div id="workerModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
116
+ <div class="bg-white rounded-xl p-6 max-w-md w-full mx-4">
117
+ <h3 class="text-lg font-semibold mb-4">작업자 선택</h3>
118
+ <div id="workerList" class="worker-list max-h-64 overflow-y-auto">
119
+ <!-- 동적으로 생성될 작업자 목록 -->
120
+ </div>
121
+ <button class="w-full bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded-lg font-medium transition-all duration-300 mt-4" onclick="hideWorkerModal()">
122
+ 닫기
123
+ </button>
124
+ </div>
125
+ </div>
126
+ </main>
127
 
128
  <custom-footer></custom-footer>
129
 
deployment.js CHANGED
@@ -1,3 +1,4 @@
 
1
  // 작업 배포 관리 스크립트
2
  document.addEventListener('DOMContentLoaded', function() {
3
  // 샘플 문서 데이터
@@ -18,7 +19,6 @@ document.addEventListener('DOMContentLoaded', function() {
18
  { id: 4, name: '최교정', group: 'C팀', status: 'available', currentTasks: 1 },
19
  { id: 5, name: '정정밀', group: 'B팀', status: 'available', currentTasks: 4 }
20
  ];
21
-
22
  // 문서 카드 생성 함수
23
  function createDocumentCard(document) {
24
  const priorityColors = {
@@ -40,7 +40,6 @@ document.addEventListener('DOMContentLoaded', function() {
40
  <div class="text-xs text-gray-500 mb-2">${document.type}</div>
41
  <div class="flex justify-between items-center">
42
  <span class="text-xs text-gray-400">마감: ${document.deadline}</span>
43
- <div class="flex space-x-1">
44
  <button class="worker-select-btn text-xs bg-primary-500 text-white px-2 py-1 rounded">
45
  작업자 선택
46
  </button>
@@ -48,8 +47,7 @@ document.addEventListener('DOMContentLoaded', function() {
48
  </div>
49
  `;
50
  }
51
-
52
- // 작업자 목록 표시 함수
53
  function showWorkerList(workers) {
54
  const workerList = workers.map(worker => `
55
  <div class="worker-item bg-gray-50 rounded-lg p-3 mb-2 cursor-pointer hover:bg-gray-100 transition-colors" data-worker-id="${worker.id}">
@@ -79,7 +77,6 @@ document.addEventListener('DOMContentLoaded', function() {
79
 
80
  document.body.appendChild(workerModal);
81
  }
82
-
83
  // 드래그 앤 드롭 기능
84
  function initializeDragAndDrop() {
85
  const documentCards = document.querySelectorAll('.document-card');
@@ -123,7 +120,6 @@ function initializeDragAndDrop() {
123
  });
124
  });
125
  }
126
-
127
  // 문서 상태 업데이트
128
  function updateDocumentStatus(documentId, columnId) {
129
  console.log(`문서 ${documentId}가 ${columnId}로 이동되었습니다.');
 
1
+
2
  // 작업 배포 관리 스크립트
3
  document.addEventListener('DOMContentLoaded', function() {
4
  // 샘플 문서 데이터
 
19
  { id: 4, name: '최교정', group: 'C팀', status: 'available', currentTasks: 1 },
20
  { id: 5, name: '정정밀', group: 'B팀', status: 'available', currentTasks: 4 }
21
  ];
 
22
  // 문서 카드 생성 함수
23
  function createDocumentCard(document) {
24
  const priorityColors = {
 
40
  <div class="text-xs text-gray-500 mb-2">${document.type}</div>
41
  <div class="flex justify-between items-center">
42
  <span class="text-xs text-gray-400">마감: ${document.deadline}</span>
 
43
  <button class="worker-select-btn text-xs bg-primary-500 text-white px-2 py-1 rounded">
44
  작업자 선택
45
  </button>
 
47
  </div>
48
  `;
49
  }
50
+ // 작업자 목록 표시 함수
 
51
  function showWorkerList(workers) {
52
  const workerList = workers.map(worker => `
53
  <div class="worker-item bg-gray-50 rounded-lg p-3 mb-2 cursor-pointer hover:bg-gray-100 transition-colors" data-worker-id="${worker.id}">
 
77
 
78
  document.body.appendChild(workerModal);
79
  }
 
80
  // 드래그 앤 드롭 기능
81
  function initializeDragAndDrop() {
82
  const documentCards = document.querySelectorAll('.document-card');
 
120
  });
121
  });
122
  }
 
123
  // 문서 상태 업데이트
124
  function updateDocumentStatus(documentId, columnId) {
125
  console.log(`문서 ${documentId}가 ${columnId}로 이동되었습니다.');
style.css CHANGED
@@ -80,7 +80,6 @@ body {
80
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
81
  transition: width 0.3s ease;
82
  }
83
-
84
  /* 배포 관리 스타일 */
85
  .document-card {
86
  transition: all 0.3s ease;
@@ -117,3 +116,28 @@ body {
117
  font-size: 0.75rem;
118
  font-weight: 600;
119
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
81
  transition: width 0.3s ease;
82
  }
 
83
  /* 배포 관리 스타일 */
84
  .document-card {
85
  transition: all 0.3s ease;
 
116
  font-size: 0.75rem;
117
  font-weight: 600;
118
  }
119
+
120
+ /* 드래그 앤 드롭 개선 스타일 */
121
+ .document-card {
122
+ user-select: none;
123
+ -webkit-user-select: none;
124
+ }
125
+
126
+ .worker-list {
127
+ scrollbar-width: thin;
128
+ scrollbar-color: #cbd5e1 #f1f5f9;
129
+ }
130
+
131
+ .worker-list::-webkit-scrollbar {
132
+ width: 6px;
133
+ }
134
+
135
+ .worker-list::-webkit-scrollbar-track {
136
+ background: #f1f5f9;
137
+ border-radius: 3px;
138
+ }
139
+
140
+ .worker-list::-webkit-scrollbar-thumb {
141
+ background-color: #cbd5e1;
142
+ border-radius: 3px;
143
+ }