fix group

This commit is contained in:
hamid zarghami
2026-05-02 09:23:20 +03:30
parent c05bcdaa48
commit 0ce2b3e85d
2 changed files with 20 additions and 2 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import { setRefreshToken, setToken } from '@/config/func'
const DirectLogin: FC = () => {
const [showModal, setShowModal] = useState<boolean>(false)
const [subscriptionId, setSubscriptionId] = useState<string>('')
const [subscriptionId, setSubscriptionId] = useState<string>('e6375048-4abc-4864-9614-198494631cae')
const directLogin = useDirectLogin()
const handleSubmit = () => {
@@ -97,7 +97,25 @@ const ObjectsLayer = ({
.filter((obj) => obj.groupId && obj.type !== "group")
.map((obj) => {
const groupObject = objects.find((o) => o.id === obj.groupId);
if (!groupObject) return null;
// داده قدیمی/ناقص: groupId بدون شیء type:group در صفحه — مثل preview همه را نشان بده
if (!groupObject) {
return (
<ObjectRenderer
key={obj.id}
obj={obj}
isSelected={selectedObjectIds.includes(obj.id)}
transformerRef={transformerRef}
layerRef={layerRef}
onSelect={onSelect}
onUpdate={onUpdate}
draggable={tool === "select"}
onCellClick={onCellClick}
onCellDblClick={onCellDblClick}
selectedCellId={selectedCellId}
allObjects={objects}
/>
);
}
// Render with absolute position but wrapped in non-listening group
return (