Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
62a3529
componente comentarios
fernando-castelo Sep 29, 2022
c3fbc61
adicao anotacoes
fernando-castelo Sep 29, 2022
99715ad
ajustes
Sep 30, 2022
826f857
ajustes nos comentarios
Sep 30, 2022
d71c4d0
mais ajustes nos comentarios
Sep 30, 2022
5587e29
implementacao inicial anotacoes
fernando-castelo Oct 1, 2022
9fa0544
implementacao inicial das abas
fernando-castelo Oct 1, 2022
95b49e5
refatoracao / adicao das anotacoes nas abas
fernando-castelo Oct 3, 2022
655b5d9
Adição da barra de navegação superior
eliseuhm Oct 4, 2022
eca50fe
Update style.css
eliseuhm Oct 4, 2022
75b6f6c
Add players de vídeo
Oct 4, 2022
d7823fc
unificando a página
Oct 4, 2022
0bcc711
tela de vídeo inicial
Oct 4, 2022
2fc8282
Merge remote-tracking branch 'origin/tela-login' into tela-video
Oct 4, 2022
c565ef3
Atualização | Readequando padrões topnavbar
eliseuhm Oct 5, 2022
0925032
partial tela de video
Oct 5, 2022
f3b9221
tela-video incompleta
Oct 5, 2022
035987c
resolvendo conflitos tela-video incompleta
Oct 5, 2022
a133fbe
Criando funções para monitorar o progresso na trilha
Oct 7, 2022
f02a508
Consertando erros de saveStats e adicionando o changeTab e a checkbox
Oct 9, 2022
5e6f84f
Barraprogresso
HyogoMoura Oct 9, 2022
c6605ca
Removendo tela-login
Oct 11, 2022
938ec1d
Removendo pasta de abas
Oct 12, 2022
cc0f449
Removendo pasta video-player
Oct 12, 2022
b435562
removendo pasta comentários
Oct 12, 2022
bf1b56c
removendo pasta anotações
Oct 12, 2022
694cd70
editando trilha
Oct 12, 2022
79bfb4b
adicionando videos no objeto trilha
Ruukaas Oct 12, 2022
a76508b
Merge branch 'tela-video' of github.com:Ruukaas/Dock-Tech into tela-v…
Ruukaas Oct 12, 2022
4c915a2
Organizando código tela-video
Ruukaas Oct 18, 2022
7625f46
Delete code.js
Ruukaas Oct 18, 2022
88d3127
Delete comentarios.css
Ruukaas Oct 18, 2022
502e5f6
Delete comentarios.js
Ruukaas Oct 18, 2022
cae0fdc
Delete comments.html
Ruukaas Oct 18, 2022
0ac9165
Delete nav-icon-bar.css
Ruukaas Oct 18, 2022
bc6257d
Delete tabs.js
Ruukaas Oct 18, 2022
565f043
Delete tabs.css
Ruukaas Oct 18, 2022
ba52b44
Delete style.css
Ruukaas Oct 18, 2022
f9c6df4
Delete notepad.js
Ruukaas Oct 18, 2022
79a8f3f
Delete notepad.html
Ruukaas Oct 18, 2022
11f62a0
Delete notepad.css
Ruukaas Oct 18, 2022
afdb100
Delete topnavbar directory
Ruukaas Oct 18, 2022
784db06
Delete Bstyle.css
Ruukaas Oct 18, 2022
fc19624
Delete Barra.html
Ruukaas Oct 18, 2022
53b7b7f
ajustando tamanho dos elementos da trilha
Ruukaas Oct 18, 2022
6194b8c
Update incompleto
WemmersonAlb Oct 19, 2022
5f94c49
Update responsividade
WemmersonAlb Oct 25, 2022
ed9bb3a
Update responsividade, ocultei as abas em desuso, coloquei scroll bar…
WemmersonAlb Oct 28, 2022
0725732
Update function firstVideo
WemmersonAlb Nov 22, 2022
0c466c7
Update firstvideo
WemmersonAlb Nov 23, 2022
694204e
Update melhoria de layout e progress bar
WemmersonAlb Dec 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions assets/code/DOM.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export const createTitle = (name,...classes) => {
let h1El = document.createElement("h1")
h1El.classList.add(...classes)
h1El.textContent = name
return h1El
}

export const createDivWithID = id => {
let divEl = document.createElement("div")
divEl.setAttribute("id",id)
return divEl
}

export const createDivWithClasses = (...classes) => {
let divEl = document.createElement("div")
divEl.classList.add(...classes)
return divEl
}

export const createParagraph = (name) => {
let pEl = document.createElement("p")
pEl.textContent = name
return pEl
}

export const createImage = (src, alt, ...classes) => {
let imgEl = document.createElement("img")
imgEl.setAttribute("src", src)
imgEl.setAttribute("alt", alt)
imgEl.classList.add(...classes)
return imgEl
}

export const createButton = (value, ...classes) => {
let btnEl = document.createElement("button")
btnEl.setAttribute("type","button")
btnEl.classList.add(...classes)
btnEl.textContent = value
return btnEl
}
134 changes: 134 additions & 0 deletions assets/code/DOM/DOM.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
export const createTitle = (name, ...classes) => {
let h1El = document.createElement("h1")
h1El.classList.add(...classes)
h1El.textContent = name
return h1El
}

export const createDivWithID = id => {
let divEl = document.createElement("div")
divEl.setAttribute("id", id)
return divEl
}

export const createDivWithClasses = (...classes) => {
let divEl = document.createElement("div")
divEl.classList.add(...classes)
return divEl
}

export const createParagraph = (name) => {
let pEl = document.createElement("p")
pEl.textContent = name
return pEl
}

export const createImage = (src, alt, ...classes) => {
let imgEl = document.createElement("img")
imgEl.setAttribute("src", src)
imgEl.setAttribute("alt", alt)
imgEl.classList.add(...classes)
return imgEl
}

export const createOption = (value, textContent) => {
let optionEl = document.createElement("option")
optionEl.setAttribute("value", value)
optionEl.textContent = textContent
return optionEl
}

export const createCheckBox = (...classes) => {
let checkBoxEl = document.createElement("input")
checkBoxEl.setAttribute("type", "checkbox");
checkBoxEl.classList.add(...classes)
return checkBoxEl
}

export const createSelect = (...classes) => {
let selectEl = document.createElement("select")
selectEl.classList.add(...classes)
return selectEl
}

export const createInputTypeNumber = (id, nome) => {
let inputEl = document.createElement("input")
inputEl.setAttribute("type", "number")
inputEl.setAttribute("id", id)
inputEl.setAttribute("name", nome)
return inputEl
}

export const getSelectMarked = (idSelect) => {
let selectEl = document.getElementById(idSelect)
let valueSelected = selectEl.options[selectEl.selectedIndex].value
return valueSelected
}

export const getInputValueByName = (nameInput) => {
let inputEl = document.getElementsByName(nameInput)[0]
return inputEl.value
}

export const getIDElement = element => element.getAttribute("id")

export const isInputNull = valor => {
if (valor === "") return true
else return false
}

export const setDefaultValueSelect = (selectElement, selectedValue) => {
let indexSelected = selectElement.selectedIndex
for (let i = 0; i < selectElement.options.length; i++) {
if (selectElement.options[i].value == selectedValue) {
selectElement.selectedIndex = i
break
}
}
return selectElement
}

//O attribute é a propridade dos objetos do array que vai ser colocada no valor
export const setOptionsInASelect = (arrayItens, idSelect, valueAttribute, textContentAttribute) => {
let currentSelectEl = document.getElementById(idSelect)
arrayItens.forEach(valor => {
let currentOption = createOption(valor[valueAttribute], valor[textContentAttribute])
currentSelectEl.appendChild(currentOption)
})
}

//sem parametro no listener
export const addEventToElementOnClick = (element, event) => {
element.addEventListener("click", event)
}

export const addEventToHTMLCollectionOnClick = (HTMLCollection, event) => {
let buttonsArray = Array.prototype.slice.call(HTMLCollection)
buttonsArray.forEach(elemento => {
elemento.addEventListener("click", event)
})
}

//retorna um array com a posição na lista dos selecionados
export const selectedCheckBox = (containerList) => {
let containerEl = document.getElementById(containerList)
let nodeChild = containerEl.childNodes
let arrayNodeChild = Array.prototype.slice.call(nodeChild)
let selectedPositionCheckbox = []
arrayNodeChild.forEach((valor, indice) => {
console.log(valor.childNodes[1].childNodes[0].checked)
if (valor.childNodes[1].childNodes[0].checked) {
selectedPositionCheckbox.push(indice)
}
})

return selectedPositionCheckbox
}

export const checkCheckboxes = (arrayIDs) => {
arrayIDs.forEach((valor) => {
let currentItem = document.getElementById(valor)
currentItem.childNodes[1].childNodes[0].checked = true
})
}

14 changes: 14 additions & 0 deletions assets/code/DOM/modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const openModal = (modalEl,fadeEl) => {
fadeEl.style.display = "flex";
modalEl.style.display = "flex";
}

export const closeModal = (modalEl,fadeEl) => {
modalEl.style.display = "none"
fadeEl.style.display = "none"
}

export const declineActionModal = (modalEl,fadeEl) => {
modalEl.style.display = "none";
fadeEl.style.display = "none";
}
8 changes: 8 additions & 0 deletions assets/code/classes/instEmpr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export class instEmpr {
constructor(nome,responsavel,contato,instEmpr) {
this.nome = nome
this.responsavel = responsavel
this.contato = contato
this.instEmpr = instEmpr
}
}
9 changes: 9 additions & 0 deletions assets/code/classes/squad.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export class squad {
constructor(arrayIDAlunos,arrayIDMentores,empresaResponsavel,numeroSquad,programaResidencia) {
this.arrayIDAlunos = arrayIDAlunos
this.arrayIDMentores = arrayIDMentores
this.empresaResponsavel = empresaResponsavel
this.numeroSquad = numeroSquad
this.programaResidencia = programaResidencia
}
}
9 changes: 9 additions & 0 deletions assets/code/classes/usuario.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export class usuario {
constructor(nome, email, funcao, instEmpr, senha) {
this.nome = nome
this.email = email
this.funcao = funcao
this.instEmpr = instEmpr
this.senha = senha
}
}
1 change: 1 addition & 0 deletions assets/code/control/control.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import { getAll } from "../db/CRUD.js"
111 changes: 111 additions & 0 deletions assets/code/db/CRUD.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import { getFirestore, getDocs, collection, addDoc, doc, getDoc, updateDoc, deleteDoc, query, where } from "https://www.gstatic.com/firebasejs/9.6.10/firebase-firestore.js";
import { removeKeyObject } from "./removeKeyObject.js";
import { setIDObjects } from "./setIDObjects.js"

const db = getFirestore();


export async function add(obj, collectionref) {
try {
await addDoc(collection(db, collectionref), Object.assign({}, obj))
return "sucesso";
} catch (e) {
console.error("Error:", e);
}
}

export async function getAll(collectionref) {
try {
let searchArray = [];
let currentObject;
let documents = await getDocs(collection(db, collectionref))
documents.forEach(valor => {
currentObject = valor.data();
currentObject = setIDObjects(currentObject, valor.id);
searchArray.push(currentObject);
console.log(searchArray);
});

return searchArray;
} catch (e) {
console.log(`Error: ${e}`);
}
}

//Retorna uma promisse daqui em diante
export const get = (id, collectionref) => {
try {
return getDoc(doc(db, collectionref, id)).then(doc => setIDObjects(doc.data(), id))
} catch (e) {
console.log(`Error: ${e}`)
}
}

export async function update(obj, collectionref) {
try {
await updateDoc(doc(db, collectionref, obj.id), Object.assign({}, obj))
return "sucesso"
} catch (e) {
console.log(`Error: ${e}`);
}
}

export const del = (id, collectionref) => {
try {
return deleteDoc(doc(db, collectionref, id)).then(() => "Sucesso")
} catch (e) {
console.log(`Error: ${e}`)
}
}

export async function filterByOneKey(collectionref,key,arrayValue) {
try {
console.log(collectionref)
let searchArray = []
let currentObject
const q = query(collection(db,collectionref), where(key, "in", arrayValue))

const documents = await getDocs(q)
documents.forEach((doc) => {
currentObject = doc.data()
currentObject = setIDObjects(currentObject, doc.id)
if(collectionref = "usuarios") {
currentObject = removeKeyObject(currentObject, "senha")
}
console.log(currentObject)
searchArray.push(currentObject)
})
return searchArray
}catch (e) {
console.log(`Error: ${e}`)
}
}

//TODO - Transformar essa função em uma função(ou criar outra) que recebe um array de arrays com par key - arrayValue para criar um filtro de NKeys
export async function filterByTwoKeys(collectionref, keyOne, valueOne, keyTwo, valueTwo) {
try {
let searchArray = []
let currentObject
console.log(keyOne)
console.log(keyTwo)
const q = query(collection(db, collectionref),where(keyOne, "==",valueOne), where(keyTwo,"==",valueTwo))

const documents = await getDocs(q)
documents.forEach((doc) => {
currentObject = doc.data()
currentObject = setIDObjects(currentObject, doc.id)
if(collectionref = "usuarios") {
currentObject = removeKeyObject(currentObject, "senha")
}
console.log(currentObject)
searchArray.push(currentObject)
})
console.log(searchArray)

return searchArray
}catch (e) {
console.log(`Error: ${e}`)
}
}


22 changes: 22 additions & 0 deletions assets/code/db/firebase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.10/firebase-app.js";

// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries

// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyAgkTFLUyk8vZWIL9ZcGqgifavQc6EAH80",
authDomain: "dock-tech.firebaseapp.com",
projectId: "dock-tech",
storageBucket: "dock-tech.appspot.com",
messagingSenderId: "612768628457",
appId: "1:612768628457:web:6aa323ec3505159008fa78",
measurementId: "G-CXH880JV5H"
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);


4 changes: 4 additions & 0 deletions assets/code/db/removeKeyObject.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const removeKeyObject = (object,key) => {
delete object[key]
return object
}
9 changes: 9 additions & 0 deletions assets/code/db/setIDObjects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const setIDObjects = (object, id) => {
Object.defineProperty(object, "id", {
enumerable: true,
writable: false,
value: id
})

return object
}
Binary file added assets/global-images/Group 52.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/add-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons/icon-nav-dockTech.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons/icons8-casa-30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons8-excluir-480.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons8-ok-50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons8-ok-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons8-ok-65.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons8-ok-cinza.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons8-x-50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/icons8-xbox-x-50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/next-left-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/ok.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/remove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/global-images/x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions assets/nav-icon-bar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.icon-bar {
max-width: 100%;
background-color: #D3D2EB;
display: flex;
justify-content: space-between;
margin: 0px;
}

Loading