33 lines
955 B
JavaScript
33 lines
955 B
JavaScript
import { LightningElement,api} from 'lwc';
|
|
import ProfilePhotoMethod from '@salesforce/apex/ProfilePhotoClass.ProfilePhotoMethod'
|
|
|
|
export default class ProfilePhoto extends LightningElement {
|
|
@api recordId;
|
|
imageUrl='';
|
|
error;
|
|
connectedCallback(){
|
|
console.log('Current page Record id',this.recordId);
|
|
ProfilePhotoMethod({Id:this.recordId})
|
|
.then(result=>{
|
|
this.imageUrl=result;
|
|
console.log('url from this image url',this.imageUrl);
|
|
console.log('From result',result);
|
|
})
|
|
.catch(error => { // Handle any errors
|
|
this.error = error; // Assign the error to the error property
|
|
})
|
|
|
|
}
|
|
showPhoto() {
|
|
// Your code for showing the photo here
|
|
window.print('Print')
|
|
}
|
|
|
|
deletePhoto() {
|
|
// Your code for deleting the photo here
|
|
}
|
|
|
|
uploadPhoto() {
|
|
// Your code for uploading a photo here
|
|
}
|
|
} |