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

생성 페이지에 사용되는 Form을 Component로 분리하여 재사용성을 확보한다. #44

Closed
seokjin8678 opened this issue Jan 26, 2024 · 0 comments · Fixed by #48
Labels
refactor 리팩터링

Comments

@seokjin8678
Copy link
Owner

School, Artist 생성 뷰에 다음과 같이 중복된 Form 형식이 나타나고 있음

<template>
  <v-card
    class="mx-auto pa-3 pa-md-15 py-8 mt-16 w-75"
    max-width="800"
    min-width="350"
    elevation="4"
  >
    <v-card-title class="mb-3">
      <p class="text-h4 text-center">
        아티스트 추가
      </p>
    </v-card-title>
    <v-form
      v-model="invalidForm"
      @submit.prevent="onSubmit"
    >
      <v-text-field
        class="mb-3"
        v-model="nameField.value.value"
        :error-messages="nameField.errorMessage.value"
        placeholder="아티스트 이름"
        variant="outlined"
        label="아티스트 이름"
      />
      <v-text-field
        class="mb-3"
        v-model="profileImageField.value.value"
        :error-messages="profileImageField.errorMessage.value"
        placeholder="https://festa-go.site/image.png"
        variant="outlined"
        label="아티스트 이미지 URL"
      />
      <v-btn
        :disabled="!invalidForm"
        :loading="loading"
        class="text-h6"
        type="submit"
        text="생성"
        color="blue"
        :block="true"
      />
    </v-form>
  </v-card>
</template>

추후 Festival, Stage 등 여러 뷰에도 같은 형식의 Form을 사용할 것이기 때문에 별도의 컴포넌트로 분리하여 재사용성 확보해야함

@seokjin8678 seokjin8678 added the refactor 리팩터링 label Jan 26, 2024
@seokjin8678 seokjin8678 changed the title refactor: 생성 페이지에 사용되는 Form을 Component로 분리하여 재사용성을 확보한다. 생성 페이지에 사용되는 Form을 Component로 분리하여 재사용성을 확보한다. Jan 26, 2024
@seokjin8678 seokjin8678 linked a pull request Jan 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor 리팩터링
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant