@optifye/dashboard-core 6.1.3 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -27
- package/dist/index.mjs +0 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33191,20 +33191,6 @@ var TargetsView = ({
|
|
|
33191
33191
|
throw lineUpsertError;
|
|
33192
33192
|
}
|
|
33193
33193
|
console.log(`[handleSaveLine] Successfully upserted line_thresholds for ${lineId}`);
|
|
33194
|
-
const operatingHoursData = {
|
|
33195
|
-
line_id: lineId,
|
|
33196
|
-
shift_id: selectedShift,
|
|
33197
|
-
start_time: lineDataToSave.shiftStartTime,
|
|
33198
|
-
end_time: lineDataToSave.shiftEndTime,
|
|
33199
|
-
breaks: lineDataToSave.breaks
|
|
33200
|
-
};
|
|
33201
|
-
console.log(`[handleSaveLine] operatingHoursData for upsert on ${lineId}:`, operatingHoursData);
|
|
33202
|
-
const { error: operatingHoursError } = await supabase.from("line_operating_hours").upsert(operatingHoursData, { onConflict: "line_id,shift_id" });
|
|
33203
|
-
if (operatingHoursError) {
|
|
33204
|
-
console.error(`[handleSaveLine] Error upserting line_operating_hours for ${lineId}:`, operatingHoursError);
|
|
33205
|
-
sonner.toast.error(`Failed to update shift hours for ${lineNames[lineId] || lineId}`);
|
|
33206
|
-
}
|
|
33207
|
-
console.log(`[handleSaveLine] Successfully upserted line_operating_hours for ${lineId}`);
|
|
33208
33194
|
setSaveSuccess((prev) => ({ ...prev, [lineId]: true }));
|
|
33209
33195
|
sonner.toast.success(`${lineNames[lineId] || lineId} targets saved successfully`);
|
|
33210
33196
|
if (onSaveChanges) onSaveChanges(lineId);
|
|
@@ -33249,19 +33235,6 @@ var TargetsView = ({
|
|
|
33249
33235
|
})
|
|
33250
33236
|
}
|
|
33251
33237
|
}));
|
|
33252
|
-
try {
|
|
33253
|
-
const line = lineWorkspaces[updates.lineId];
|
|
33254
|
-
const currentHours = await loadOperatingHours(updates.lineId, selectedShift);
|
|
33255
|
-
await supabase?.from("line_operating_hours").upsert({
|
|
33256
|
-
line_id: updates.lineId,
|
|
33257
|
-
shift_id: selectedShift,
|
|
33258
|
-
start_time: line.shiftStartTime,
|
|
33259
|
-
end_time: line.shiftEndTime,
|
|
33260
|
-
breaks: currentHours?.breaks || line.breaks || []
|
|
33261
|
-
});
|
|
33262
|
-
} catch (error) {
|
|
33263
|
-
console.error("Error updating line operating hours:", error);
|
|
33264
|
-
}
|
|
33265
33238
|
sonner.toast.success(`Updated ${updates.workspaceIds.length} workspaces in ${lineNames[updates.lineId] || updates.lineId}`);
|
|
33266
33239
|
setIsBulkConfigureOpen(false);
|
|
33267
33240
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -33162,20 +33162,6 @@ var TargetsView = ({
|
|
|
33162
33162
|
throw lineUpsertError;
|
|
33163
33163
|
}
|
|
33164
33164
|
console.log(`[handleSaveLine] Successfully upserted line_thresholds for ${lineId}`);
|
|
33165
|
-
const operatingHoursData = {
|
|
33166
|
-
line_id: lineId,
|
|
33167
|
-
shift_id: selectedShift,
|
|
33168
|
-
start_time: lineDataToSave.shiftStartTime,
|
|
33169
|
-
end_time: lineDataToSave.shiftEndTime,
|
|
33170
|
-
breaks: lineDataToSave.breaks
|
|
33171
|
-
};
|
|
33172
|
-
console.log(`[handleSaveLine] operatingHoursData for upsert on ${lineId}:`, operatingHoursData);
|
|
33173
|
-
const { error: operatingHoursError } = await supabase.from("line_operating_hours").upsert(operatingHoursData, { onConflict: "line_id,shift_id" });
|
|
33174
|
-
if (operatingHoursError) {
|
|
33175
|
-
console.error(`[handleSaveLine] Error upserting line_operating_hours for ${lineId}:`, operatingHoursError);
|
|
33176
|
-
toast.error(`Failed to update shift hours for ${lineNames[lineId] || lineId}`);
|
|
33177
|
-
}
|
|
33178
|
-
console.log(`[handleSaveLine] Successfully upserted line_operating_hours for ${lineId}`);
|
|
33179
33165
|
setSaveSuccess((prev) => ({ ...prev, [lineId]: true }));
|
|
33180
33166
|
toast.success(`${lineNames[lineId] || lineId} targets saved successfully`);
|
|
33181
33167
|
if (onSaveChanges) onSaveChanges(lineId);
|
|
@@ -33220,19 +33206,6 @@ var TargetsView = ({
|
|
|
33220
33206
|
})
|
|
33221
33207
|
}
|
|
33222
33208
|
}));
|
|
33223
|
-
try {
|
|
33224
|
-
const line = lineWorkspaces[updates.lineId];
|
|
33225
|
-
const currentHours = await loadOperatingHours(updates.lineId, selectedShift);
|
|
33226
|
-
await supabase?.from("line_operating_hours").upsert({
|
|
33227
|
-
line_id: updates.lineId,
|
|
33228
|
-
shift_id: selectedShift,
|
|
33229
|
-
start_time: line.shiftStartTime,
|
|
33230
|
-
end_time: line.shiftEndTime,
|
|
33231
|
-
breaks: currentHours?.breaks || line.breaks || []
|
|
33232
|
-
});
|
|
33233
|
-
} catch (error) {
|
|
33234
|
-
console.error("Error updating line operating hours:", error);
|
|
33235
|
-
}
|
|
33236
33209
|
toast.success(`Updated ${updates.workspaceIds.length} workspaces in ${lineNames[updates.lineId] || updates.lineId}`);
|
|
33237
33210
|
setIsBulkConfigureOpen(false);
|
|
33238
33211
|
};
|