// Parse product sheets
$ids = [];
foreach ($excel[$filename] as $sheet => $rows) {
- $options = array_splice($rows, 9);
- $emptyRef = array_filter($options, function($n) { return empty($n[6]); });
+ $_rows = $rows;
+ $options = array_splice($_rows, 9);
+ $emptyRef = array_filter($options, function($n) { return $this->isEmpty($n[6]); });
+
if($emptyRef) {
$contentMail["details"][$filename][$sheet] = "[ERREUR] Référence option manquante";
continue;
// Parse rows of sheet
-
foreach ($rows as $row => $columns) {
if ($row < 8) {
foreach ($fields as $key => $field) {
->toArray();
foreach ($ids as $sheet => $id) {
- if ($product[$id]) {
+ if (array_key_exists($id, $product)) {
$changes = $this->storeAndReturnChanges($data);
// Remove empty array from the changes
$message->sender(config('mail.from.address'), config('mail.from.name'));
$message->to(config('mail.to'));
$message->bcc('test+pmi@cubedesigners.com');
+ $message->bcc('contact@pm-instrumentation.com');
$message->subject("[PMI] Import des fiches produits");
});
}
+
+ public function isEmpty($v) {
+ return null===$v || $v===false || $v==='';
+ }
}
Mail::raw(implode("\r\n", $contents), function ($message) use ($validatedData, $page, $subject_,$recipient) {
$message->from(config('mail.from.address'), config('mail.from.name'));
$message->sender(config('mail.from.address'), config('mail.from.name'));
- //$message->to('soufiane@cubedesigners.com');
+ $message->to('soufiane@cubedesigners.com');
$message->bcc('test+pmi@cubedesigners.com');
if($recipient) {
$message->to($recipient);
--- /dev/null
+import { test, expect } from '@playwright/test';
+
+test('email exist', async ({ page }) => {
+ await page.goto('https://dev.pm-instrumentation.com/', {waitUntil: 'domcontentloaded'});
+
+ await page.getByRole('link', { name: 'Se connecter' }).click();
+
+ await page.getByRole('textbox').fill('example value');
+
+ await page.getByText('Connexion').click();
+
+ console.log(page.waitForResponse());
+});
},
mounted() {
-
eventBus.$on('add-item', data => {
data.action = 'add';
data.ref = data.ref !== "" ? data.ref : this.ref;
this.discount = this.$refs.discount ?.dataset.value
this.validateAction = this.$refs.forgotpwd ?.dataset.status //specific code for the forgot password confirmation
- console.log(this.cartData)
+ let option = this.$refs.optionsExist?.dataset.val;
+ this.statusConfig = !option && this.price ? true : false
+ console.log("option",option)
},
watch: {
|
*/
- 'failed' => 'Ces identifiants s',
+ 'failed' => 'Ces identifiants sont incorrects',
'throttle' => 'Trop de tentatives. Veuillez patienter :seconds secondes.',
];
</div>
<div class="product-infos flex sm:flex-col justify-between sm:items-start items-center">
<div>
- <p class="no-m">{{ $product['reference'].'|'.$product['ref'] }}</p>
+ <p class="no-m">
+ {{ $product['reference'] }}
+ @if($product['ref'])
+ {{ '|'. (is_array($product['ref']) ? implode("",$product['ref']) : $product['ref']) }}
+ @endif
+ </p>
<p class="no-m text-navy">{{ $product['name'] }}</p>
@if(isset($product['discount']) && $product['discount'] !== 0)
@if(floatval($product['basic_selling_price']))
<span ref="optprice" v-cloak data-default="{{ $product->basic_selling_price }}">@{{ price }}</span>{{ "€ ".__('HT') }}
@endif
</div>
+ @if($options)
<div class="opt-statut">{{ __('Statut') }} :
<span v-cloak :class="{ 'text-green' : statusConfig }" ref="statusConfig" data-incomplete="{{ __('La configuration est incomplète') }}" data-completed="{{ __('La configuration est complète') }}">
@{{ statusText }}
</span>
</div>
+ @endif
+ <input type="hidden" ref="optionsExist" data-val="{{$options}}">
</div>
@endif
@endauth