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

Add promo video to form #1292

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

snorrekr
Copy link
Contributor

No description provided.

@snorrekr snorrekr self-assigned this Aug 22, 2024
@snorrekr snorrekr marked this pull request as ready for review September 10, 2024 19:14
Copy link
Contributor

@magsyg magsyg left a comment

Choose a reason for hiding this comment

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

Fix opp i merges, slett og lag heller en enkel istedenfor 3

@@ -701,11 +702,20 @@ class Meta:

class RecruitmentSerializer(CustomBaseSerializer):
seperate_positions = RecruitmentSeperatePositionSerializer(many=True, read_only=True)
promo_media = serializers.CharField(max_length=100)
Copy link
Contributor

Choose a reason for hiding this comment

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

Tror ikke dette er nødvendig, ettersom det er allerede gjort gjennom at det er et innkludert felt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Det var nødvendig for å tillate input lenger enn 11 characters i api-interface

Copy link
Contributor

@Mathias-a Mathias-a left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Kan gjøres i 1 migrasjonsfil :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Think i did so?

Comment on lines 293 to +294
max_applications: 'max_applications',
promo_media: 'promo_video',
Copy link
Contributor

Choose a reason for hiding this comment

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

feil navngivning, se toppen av filen

Comment on lines 691 to +692
[KEY.max_applications]: 'Max applications per user',
[KEY.promo_media]: "Promo Video",
Copy link
Contributor

Choose a reason for hiding this comment

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

liten V?

Comment on lines +711 to +718
def validate_promo_media(self, value: str | None) -> str | None:
if (value is None):
return None
match = re.search(r'(youtu.*be.*)\/(watch\?v=|embed\/|v|shorts|)(.*?((?=[&#?])|$))', value)
if (match):
return match.group(3)
raise ValidationError("Invalid youtube url")

Copy link
Contributor

Choose a reason for hiding this comment

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

Hvor brukes denne? Bør nok være i recruitment og ikke serializer. Validate blir brukt i andre steder i recruitment model objektet, kan sette dette opp der

Copy link
Contributor

Choose a reason for hiding this comment

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

Kan i samme sleng påkreve kun siste biten av url, og så manuellt legge den til når den vises

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Den kjøres av seg selv, django magic ellerno

Copy link
Member

Choose a reason for hiding this comment

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

…eate-frontend-for-submitting-and-displaying-recruitment-promo-media
};

function youtubeLinkValidator(state: FormType): SamfError {
Copy link
Member

Choose a reason for hiding this comment

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

Anbefaler å holde komponentfilen ren. Kan flyttes til ./utils.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create frontend for submitting and displaying recruitment promo media
4 participants