|
@@ -486,16 +486,16 @@ class AppointmentService
|
|
|
->get()
|
|
|
->toArray();
|
|
|
if ($goods->is_support_appointment == 'Y' && !empty($goods->goods_extend_json)) {
|
|
|
- $extendJson = json_decode($goods->goods_extend_json, true);
|
|
|
+ $extendJson = json_decode($goods->goods_attribute_json, true);
|
|
|
$times = $extendJson['times'];
|
|
|
foreach ($times as $key => $time) {
|
|
|
- $timesStr = $time['appointmentTimeStart'] . '~' . $time['appointmentTimeEnd'];
|
|
|
- $times[$key]['timesStr'] = $timesStr;
|
|
|
+// $timesStr = $time['appointmentTimeStart'] . '~' . $time['appointmentTimeEnd'];
|
|
|
+ $times[$key]['timesStr'] = $time['duration'];
|
|
|
foreach ($appointments as $appointment) {
|
|
|
if (!empty($appointment['appointment_apply_json'])) {
|
|
|
$applyJson = json_decode($appointment['appointment_apply_json'], true);
|
|
|
$applyJsonTimes = $applyJson['times'] ?? '';
|
|
|
- if ($timesStr == $applyJsonTimes) {
|
|
|
+ if ($time['duration'] == $applyJsonTimes) {
|
|
|
$times[$key]['person'] -= $applyJson['person'];
|
|
|
if ($times[$key]['person'] < 1) {
|
|
|
$times[$key]['disabled'] = true;
|