Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[✍️ Dev Log] 신승길 / 2021-05-25

Aperta
#153 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@gatsukichi ci sta già lavorando.

Dal 25/5/2021.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

@katsukichi/불꽃코딩🔥 Dev Log
오늘은 어떻게 프로젝트에 기여했나요?
  • 칸반보드의 소켓통신화 진행중인데 아직 마무리가 덜됬다.
오늘의 프로젝트에서 힘든 점은 무엇인가요?
  • await이 많이들어가니까 엄청 느려졌다. 로직이 잘못됬음을 깨닷고 join 메서드를 이용해서, 연속으로 chain을 계속 쭉쭉 걸어서 하나의 await으로 처리해야겠다.

const structuringData = async (part: string, projectId: number) => {
	const foundProject = await Projects.findOne({ where: { id: projectId } });

	const foundParts = await Parts.findOne({
		where: {
			title: part,
			doingProject: foundProject,
		},
	});
	if (foundParts) {
		const foundTaskBox = await Task_boxes.find({
			where: {
				groupingPart: foundParts,
			},
			order: {
				index: 'ASC',
			},
		});
		const taskBox = [];
		const taskItem: {
			[index: number]: any;
		} = {};
		for (let i = 0; i < foundTaskBox.length; i++) {
			const foundTasks = await Tasks.find({
				where: {
					groupingBox: foundTaskBox[i],
				},
				order: {
					index: 'ASC',
				},
			});
			let taskBoxOne: {
				taskBoxTitle: string;
				tasks: Array<string>;
			} = Object.assign({}, { taskBoxTitle: foundTaskBox[i].title, tasks: [] });
			taskBoxOne.tasks = foundTasks.map(el => String(el.id));
			//taskBox하나에 tasks를 집어넣는다.
			taskBox.push(taskBoxOne);
			// 여기까지 taskBox하나만드는것 완료

			for (let j = 0; j < foundTasks.length; j++) {
				const foundChecklist = await Checklists.find({ where: { nowTask: foundTasks[j] } });
				taskItem[foundTasks[j].id] = {
					taskTitle: foundTasks[j].title,
					desc: foundTasks[j].desc,
					taskColor: foundTasks[j].taskColor,
					startDate: foundTasks[j].startDate,
					endDate: foundTasks[j].endDate,
					assigness: JSON.parse(foundTasks[j].assignees),
					checkList: foundChecklist
						? foundChecklist.map(el => {
								return { desc: el.desc, isChecked: el.isChecked };
						  })
						: [],
				};
			}
		}
		console.log(taskBox, taskItem);
		return { taskBox, taskItem };
	} else {
		const taskBox: {
			taskBoxTitle: string;
			tasks: Array<string>;
		}[] = [];
		const taskItem: {
			[index: number]: any;
		} = {};
		return { taskBox, taskItem };
	}
};

진짜 코드가 너무 지저분하다 ;;

얼른 join chain으로 해결해야겠다.

내일은 프로젝트에 기여하기 위해 무엇을 해야 하나요?
  • 오늘중으로 칸반보드 50프로이상 구현
Lingua principale
TypeScript
Stelle
9
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codestates/Reciper-server

Tutte le issue di codestates/Reciper-server

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.