@nebulit/embuilder 0.1.46 → 0.1.48

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.
@@ -21,10 +21,10 @@ const AuthContext = createContext<AuthContextType>({
21
21
  export const useAuth = () => useContext(AuthContext);
22
22
 
23
23
  const fetchAssignedTenant = async (userId: string): Promise<string | null> => {
24
- try {
24
+ /*try {
25
25
  const { data, error } = await supabase
26
- .from("slice_assigned_restaurants")
27
- .select("restaurant_id")
26
+ .from("tenant_to_user_mapping")
27
+ .select("tenant_id")
28
28
  .eq("owner_id", userId)
29
29
  .maybeSingle();
30
30
 
@@ -32,11 +32,12 @@ const fetchAssignedTenant = async (userId: string): Promise<string | null> => {
32
32
  console.error("Error fetching assigned tenant:", error);
33
33
  return null;
34
34
  }
35
- return data?.restaurant_id ?? null;
35
+ return data?.tenant_id ?? null;
36
36
  } catch (error) {
37
37
  console.error("Error fetching assigned tenant:", error);
38
38
  return null;
39
- }
39
+ }*/
40
+ return null
40
41
  };
41
42
 
42
43
  export const AuthProvider = ({ children }: { children: ReactNode }) => {
@@ -9,4 +9,5 @@ You assign tasks to workers. Only one task can be assigned and in status planned
9
9
  2. if the slice is in status planned and not assigned, assign it to backend_worker (property "assigned" ) and continue with backend/prompt.md. Ignore the rest of this file.
10
10
  3. if the status is in status "InProgress" and assigned to backend_worker, updated started_time and continue with backend/prompt.md. Ignore the rest of this file.
11
11
  4. if the status is "done" and assigned to "backend_worker", assign the task to "ui_worker" and move it back to status "planned". continue with frontend/prompt.md. Ignore the rest of this file.
12
- 4. if there is no task in status planned, return <promise>NO_TASKS</promise>
12
+ 5. if there is no task in status planned, return <promise>NO_TASKS</promise>
13
+ 6. If one task is done. Finish your work, do not continue with the next slice.
@@ -223,7 +223,7 @@ const server = createServer(async (req, res) => {
223
223
  if (index == -1) {
224
224
  sliceIndices.slices.push(sliceIndex);
225
225
  } else {
226
- sliceIndices.slices[index] = sliceIndex;
226
+ sliceIndices.slices[index] = {...sliceIndices.slices[index], ...sliceIndex};
227
227
  }
228
228
  });
229
229
  writeFileSync(indexFile, JSON.stringify(sliceIndices, null, 2));
@@ -275,6 +275,7 @@ const server = createServer(async (req, res) => {
275
275
  const allSlices = indexData.slices.map(s => ({
276
276
  title: s.slice,
277
277
  status: s.status,
278
+ assignee: s.assignee,
278
279
  id: s.id,
279
280
  specifications: specificationsMap.get(s.id)
280
281
  }));