1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(bug) unable to show machine/training picture

This commit is contained in:
Du Peng 2024-03-29 18:28:42 +01:00
parent 407c0173ab
commit 61dfa141cc
5 changed files with 6 additions and 4 deletions

View File

@ -7,6 +7,7 @@
- improvement: add sp certificate for saml provider
- Fix a bug: unable to update a space with a deleted machine
- Fix a bug: unable to get invoice payment details if the account code is same for card/transfer payment method
- Fix a bug: unable to show machine/training picture
- updates translations
## v6.3.16 2024 March 11

View File

@ -49,9 +49,10 @@ const MachineCard: React.FC<MachineCardProps> = ({ user, machine, onShowMachine,
if (!machine.machine_image_attributes?.attachment_url) {
return <div className="machine-picture no-picture" />;
}
console.log(machine.machine_image_attributes.attachment_url);
return (
<div className="machine-picture" style={{ backgroundImage: `url(${machine.machine_image_attributes.attachment_url}), url('/default-image.png')` }} onClick={handleShowMachine} />
<div className="machine-picture" style={{ backgroundImage: `url("${machine.machine_image_attributes.attachment_url}"), url('/default-image.png')` }} onClick={handleShowMachine} />
);
};

View File

@ -2,7 +2,7 @@
<h4 class="text-sm m-t-sm" translate>{{ 'app.public.home.latest_documented_projects' }}</h4>
<uib-carousel interval="5000" disable-animation="true" active="activeSlide">
<uib-slide class="h480 cover r" ng-repeat="p in lastProjects track by $index" index="$index" style="background-image:url({{p.project_image}});">
<uib-slide class="h480 cover r" ng-repeat="p in lastProjects track by $index" index="$index" style="background-image:url('{{p.project_image}}');">
<div class="carousel-caption">
<h1 class="title"><a ui-sref="app.public.projects_show({id:p.slug})">{{p.name}}</a></h1>
</div>

View File

@ -52,7 +52,7 @@
<div class="panel-heading picture" ng-if="!space.space_image_attributes" ng-click="showSpace(space)">
<img src="data:image/png;base64," data-src="holder.js/100%x100%/text:&#xf03e;/font:'Font Awesome 5 Free'/icon" bs-holder class="img-responsive">
</div>
<div class="panel-heading picture" style="background-image:url({{space.space_image_attributes.attachment_url}})" ng-if="space.space_image_attributes" ng-click="showSpace(space)">
<div class="panel-heading picture" style="background-image:url('{{space.space_image_attributes.attachment_url}}')" ng-if="space.space_image_attributes" ng-click="showSpace(space)">
</div>
<div class="panel-body">
<h1 class="text-center m-b">{{space.name}}</h1>

View File

@ -25,7 +25,7 @@
<div class="panel-heading picture" ng-if="!training.training_image_attributes" ng-click="showTraining(training)">
<img src="data:image/png;base64," data-src="holder.js/100%x100%/text:&#xf03e;/font:'Font Awesome 5 Free'/icon" bs-holder class="img-responsive">
</div>
<div class="panel-heading picture" style="background-image:url({{training.training_image_attributes.attachment_url}})" ng-if="training.training_image_attributes" ng-click="showTraining(training)">
<div class="panel-heading picture" style="background-image:url('{{training.training_image_attributes.attachment_url}}')" ng-if="training.training_image_attributes" ng-click="showTraining(training)">
</div>
<div class="panel-body">
<h1 class="m-b text-center">{{training.name}}</h1>