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

OHRM5X-1733: Develop buzz - share photo component #1510

Merged
merged 2 commits into from
Oct 27, 2022

Conversation

Super-Chama
Copy link
Member

No description provided.

@Super-Chama Super-Chama marked this pull request as draft October 26, 2022 07:01
@Super-Chama Super-Chama marked this pull request as ready for review October 26, 2022 11:55
photos() {
return (this.media || []).map(photo => {
const {type, base64} = photo;
return `data:${type};base64,${base64}`;
Copy link
Member

Choose a reason for hiding this comment

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

can this component reuse, if we provide img src as URLs?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah. planning to reuse.

Comment on lines +87 to +95
const fileTypeValidator = validFileTypes([
'image/gif',
'image/jpeg',
'image/jpg',
'image/pjpeg',
'image/png',
'image/x-png',
]);
const fileSizeValidator = maxFileSize(1024 * 1024 * 2);
Copy link
Member

Choose a reason for hiding this comment

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

will get valid file types and size from BE via props. any possibility to hard code in controller for the moment

Copy link
Member Author

Choose a reason for hiding this comment

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

I checked. Issue is this componet is deep inside. maybe we will have to use provide/inject

name: 'PhotoUploadArea',

components: {
'oxd-icon': Icon,
Copy link
Member

Choose a reason for hiding this comment

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

shall we register Icons as a global component, if it is highly used?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we have globally registered oxd-icon-button component. this is used in few places, but at this stage no difference

@RajithaKumara RajithaKumara merged commit 21bf6af into orangehrm:5.3 Oct 27, 2022
Super-Chama pushed a commit to Super-Chama/orangehrm that referenced this pull request Dec 13, 2022
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.

None yet

2 participants