This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| programZi([Zi, Luna, An], DurataConsultului) -> | |
| Programari = boss_db:find(programare, [{data, 'equals', string:join([An, Luna, Zi], "-")}], [{order_by, ora}]), | |
| Pacienti = [ boss_db:find(PacientId) || {programare, _,_,_,_,PacientId} <-Programari], | |
| OreInterval = [{Ora, Minut, DurataConsultului} || Ora<-lists:seq(1,12), Minut<-lists:seq(1,60,DurataConsultului)], | |
| ProgramulZileiCuProgramari = lists:zipwith(combinaOreleCuProgramarile(OreInterval, Programari),OreInterval, Programari), | |
| {json, [{programari, Programari}, {pacienti, Pacienti}, {program, ProgramulZileiCuProgramari} ]}. | |
| combinaOreleCuProgramarile(OraGenerata = {OraMomentului, MinutulMomentului, DurataConsultului}, | |
| Programare = {programare, _Id, _Data, {OraProgramarii, MinutulProgramarii, _SecundaProgramarii}, DurataProgramarii, Pacient}) | |
| when OraMomentului == OraProgramarii -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| coffee: | |
| $modal = $('#modal') | |
| $modal_close = $modal.find('.close') | |
| $modal_container = $('#modal-container') | |
| #pt toate linkurile cu data-remote! | |
| $(document).on 'ajax:success', 'a[data-remote]',(xhr, data, status) -> | |
| $modal | |
| .html(data.html) | |
| .prepend(modal, close) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| hi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| routes: | |
| resources :drugs do | |
| collection do | |
| get :find_by_dci | |
| end | |
| #match '/drugs/find_by_dci/:id', :controller => 'drugs', :action =>'find_by_dci' | |
| resources :line_drugs | |
| end | |
| controller: | |
| def find_by_dci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $("form.new_pacient").on "ajax:success", (event, data, status, xhr) -> | |
| $("#newPacientModal").modal('hide') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| link and modal: | |
| <%= link_to 'Adauga pacient in evidenta', new_pacient_path, :class=>"btn btn-mini btn-info", | |
| :data =>{:toggle => "modal", :target=>"#newPacientModal"}, :remote => true %> <br/> | |
| <div id="newPacientModal" class="modal hide fade"> | |
| <button type="button" class="close" data-dismiss="modal">×</button> | |
| <div class="modal-header"> | |
| <h3> Adauga pacient nou</h3> | |
| </div> | |
| <%= render :partial =>'form-modal' %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| link and modal: | |
| <%= link_to 'Adauga pacient in evidenta', new_pacient_path, :class=>"btn btn-mini btn-info", | |
| :data =>{:toggle => "modal", :target=>"#newPacientModal"}, :remote => true %> <br/> | |
| <div id="newPacientModal" class="modal hide fade"> | |
| <button type="button" class="close" data-dismiss="modal">×</button> | |
| <div class="modal-header"> | |
| <h3> Adauga pacient nou</h3> | |
| <div class="modal-body"> | |
| <%= render :partial =>'form-modal' %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| form: | |
| <div id="newRetetarModal" class="modal hide fade"> | |
| <button type="button" class="close" data-dismiss="modal">x</button> | |
| <div class="page-header"> | |
| <h2> Retetar nou</h2> | |
| </div> | |
| <% @retetar = Retetar.new %> | |
| <input id="nimic" type="hidden" value="<%= params[:modal] = true%>" /> | |
| <%= render :partial => '/retetars/form' %> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= link_to "Adauga retetar", new_retetar_path, :data=>{:toggle=>"modal", :target => "#newRetetarModal"}, :remote => true %> | |
| <div id="newRetetarModal" class="modal hide fade"> | |
| <button type="button" class="close" data-dismiss="modal">x</button> | |
| <div class="page-header"> | |
| <h2> Retetar nou</h2> | |
| </div> | |
| <% @retetar = Retetar.new %> | |
| <%= render :partial => '/retetars/form' %> | |
| </div> | |
| controller: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create_table "drugs", :force => true do |t| | |
| t.string "nume" | |
| t.string "dci" | |
| t.float "doza" | |
| t.string "cod" | |
| t.string "diagnostic" | |
| t.datetime "created_at", :null => false | |
| t.datetime "updated_at", :null => false | |
| end |
NewerOlder