import wixData from 'wix-data'; import wixUsers from 'wix-users'; // Replace 'TimeLog' and 'Staff' with your actual collection IDs const TIME_COLLECTION = 'TimeLog'; const STAFF_COLLECTION = 'Staff'; $w.onReady(function () { // Get the current user's ID const userId = wixUsers.currentUser.id; // --- CLOCK IN FUNCTION --- $w('#clockInButton').onClick(async () => { if (!userId) { console.error("User not logged in."); return; } const now = new Date(); const today = now.toDateString(); // Get a date string for filtering // 1. Check if the user has already clocked in today let logQuery = await wixData.query(TIME_COLLECTION) .eq('employeeLink', userId) .eq('date', today) .find(); if (logQuery.items.length > 0) { $w('#statusText').text = "You have already clocked in today."; return; } // 2. Insert new time entry let newEntry = { "employeeLink": userId, "inTime": now, "date": today // Store the date string for easy filtering }; try { await wixData.insert(TIME_COLLECTION, newEntry); $w('#statusText').text = `Clocked In at: ${now.toLocaleTimeString()}`; // Refresh dataset here to update the user's log history $w('#timeLogDataset').refresh(); } catch (error) { console.error("Error clocking in:", error); $w('#statusText').text = "Error clocking in. Please try again."; } }); // --- CLOCK OUT FUNCTION --- $w('#clockOutButton').onClick(async () => { if (!userId) { console.error("User not logged in."); return; } const now = new Date(); const today = now.toDateString(); // 1. Find today's existing Clock In entry let logQuery = await wixData.query(TIME_COLLECTION) .eq('employeeLink', userId) .eq('date', today) .find(); if (logQuery.items.length === 0) { $w('#statusText').text = "You must clock in before clocking out."; return; } // 2. Update the existing entry with outTime let existingEntry = logQuery.items[0]; // Check if already clocked out if (existingEntry.outTime) { $w('#statusText').text = "You have already clocked out for today."; return; } existingEntry.outTime = now; try { await wixData.update(TIME_COLLECTION, existingEntry); $w('#statusText').text = `Clocked Out at: ${now.toLocaleTimeString()}`; // Refresh dataset to show the new time $w('#timeLogDataset').refresh(); } catch (error) { console.error("Error clocking out:", error); $w('#statusText').text = "Error clocking out. Please try again."; } }); });
top of page
Shear wall building

Shear Wall 

Shear wall technology is crucial in modern construction, providing essential structural support and building stability. These vertical walls are specifically designed to resist lateral forces, such as wind and seismic activity, ensuring the safety and durability of structures. By integrating shear walls into architectural designs, engineers can enhance both the performance and resilience of buildings, making them better equipped to withstand various environmental challenges. As the construction industry continues to evolve, the importance of shear wall technology remains paramount in creating safe and robust structures.

Shear wall building

 Load-

bearing

About Shear Wall

Shear walls are crucial structural elements in buildings designed to withstand lateral forces like wind and earthquakes. They act as vertical, stiff planes, transferring these forces down to the foundation and preventing the structure from swaying or collapsing. Think of them as the building's backbone against lateral loads. They are typically integrated into the building's frame, often around stairwells, elevator shafts, or exterior walls, becoming an integral part of the structural system. Different materials can be used for shear walls, each with its advantages.

Types of Shear Walls:

  • Reinforced Concrete Shear Walls: These are a common choice due to their strength and ease of construction. They can be cast in place or precast. They offer excellent resistance to both compressive and shear forces.

  • Masonry Shear Walls: Constructed from bricks or concrete blocks, these are often used in low-rise buildings. They are cost-effective and can provide good thermal insulation.

  • Steel Shear Walls: Offering high strength and ductility, steel shear walls are suitable for high-rise buildings or areas with high seismic activity. They are lighter than concrete, which can be advantageous.

  • Composite Shear Walls: These combine materials, such as steel and concrete, to leverage each other's strengths.

Benefits of Using Shear Walls:

  • Enhanced Structural Integrity: Shear walls significantly improve a building's resistance to lateral forces, increasing safety and reducing the risk of damage.

  • Increased Stiffness: They contribute to the overall stiffness of the building, minimizing sway and vibrations, which enhances comfort.

  • Improved Safety: By resisting lateral loads, they protect occupants and the building's structural integrity during extreme events.

  • Design Flexibility: Shear walls can be integrated relatively easily into the design, especially in the early stages of planning.

  • Potential Additional Benefits: Depending on the material, shear walls can offer thermal insulation, soundproofing, and fire resistance.

Usage and Considerations:

Shear walls are essential in areas prone to high winds or seismic activity. Their placement and design are critical. Engineers carefully analyze the building's design, location, and anticipated loads to determine the optimal size, type, and location of shear walls. Factors to consider include:

  • Building Height: Taller buildings generally require more robust shear wall systems.

  • Seismic Zone: Areas with high seismic activity necessitate specialized design and detailing of shear walls for earthquake resistance.

  • Wind Loads: Regions with strong winds require shear walls designed to resist these forces.

  • Soil Conditions: The type of soil influences the foundation design and how loads are transferred from the shear walls.

  • Architectural Considerations: Shear walls need to be integrated into the building's design without compromising aesthetics or functionality.

In summary, shear walls are vital for ensuring the safety and stability of buildings. Their selection and design require careful consideration of various factors to provide effective resistance to lateral forces.

Home is not where you live but where they understand you." - Christian Morgenstern
bottom of page